from service import Service
from service_factory import ServiceFactory


class Application:
    def __init__(self, service_factory: ServiceFactory):
        self.service_factory = service_factory
        self.service: Service = None
        self.prepare_service()

    def prepare_service(self):
        self.service = self.service_factory.create_service("ServiceA")

    def perform_service_task(self):
        self.service.do_something()










e0ccfb29ddc79a344658151ff9dcdb4e3e94fa20
<mask token>


class Application:
    <mask token>
    <mask token>

    def perform_service_task(self):
        self.service.do_something()

<mask token>


class Application:
    <mask token>

    def prepare_service(self):
        self.service = self.service_factory.create_service('ServiceA')

    def perform_service_task(self):
        self.service.do_something()

<mask token>


class Application:

    def __init__(self, service_factory: ServiceFactory):
        self.service_factory = service_factory
        self.service: Service = None
        self.prepare_service()

    def prepare_service(self):
        self.service = self.service_factory.create_service('ServiceA')

    def perform_service_task(self):
        self.service.do_something()

from service import Service
from service_factory import ServiceFactory


class Application:

    def __init__(self, service_factory: ServiceFactory):
        self.service_factory = service_factory
        self.service: Service = None
        self.prepare_service()

    def prepare_service(self):
        self.service = self.service_factory.create_service('ServiceA')

    def perform_service_task(self):
        self.service.do_something()

from service import Service
from service_factory import ServiceFactory


class Application:
    def __init__(self, service_factory: ServiceFactory):
        self.service_factory = service_factory
        self.service: Service = None
        self.prepare_service()

    def prepare_service(self):
        self.service = self.service_factory.create_service("ServiceA")

    def perform_service_task(self):
        self.service.do_something()









