2021.4.1 #11
@ -14,7 +14,8 @@ class ApplicationBuilder(ApplicationBuilderABC):
|
||||
"""
|
||||
Builder class for application
|
||||
"""
|
||||
ApplicationBuilderABC.__init__(self, app)
|
||||
ApplicationBuilderABC.__init__(self)
|
||||
self._app = app
|
||||
self._startup: Optional[StartupABC] = None
|
||||
|
||||
self._configuration = Configuration()
|
||||
|
@ -7,11 +7,10 @@ from cpl.application.startup_abc import StartupABC
|
||||
|
||||
class ApplicationBuilderABC(ABC):
|
||||
|
||||
def __init__(self, app: Type[ApplicationABC]):
|
||||
def __init__(self, *args):
|
||||
"""
|
||||
ABC of application builder
|
||||
"""
|
||||
self._app = app
|
||||
|
||||
@abstractmethod
|
||||
def use_startup(self, startup: Type[StartupABC]):
|
||||
|
@ -1,6 +1,5 @@
|
||||
from abc import ABC, abstractmethod
|
||||
|
||||
from cpl.application.application_runtime_abc import ApplicationRuntimeABC
|
||||
from cpl.configuration.configuration_abc import ConfigurationABC
|
||||
from cpl.dependency_injection.service_provider_abc import ServiceProviderABC
|
||||
|
||||
@ -8,15 +7,11 @@ from cpl.dependency_injection.service_provider_abc import ServiceProviderABC
|
||||
class StartupABC(ABC):
|
||||
|
||||
@abstractmethod
|
||||
def __init__(self, config: ConfigurationABC, runtime: ApplicationRuntimeABC, services: ServiceProviderABC):
|
||||
def __init__(self, *args):
|
||||
"""
|
||||
ABC for a startup class
|
||||
"""
|
||||
|
||||
self._configuration = config
|
||||
self._application_runtime = runtime
|
||||
self._services = services
|
||||
|
||||
@abstractmethod
|
||||
def configure_configuration(self) -> ConfigurationABC:
|
||||
"""
|
||||
|
@ -23,7 +23,11 @@ from cpl_cli.publish.publisher_abc import PublisherABC
|
||||
class Startup(StartupABC):
|
||||
|
||||
def __init__(self, config: ConfigurationABC, runtime: ApplicationRuntimeABC, services: ServiceProviderABC):
|
||||
StartupABC.__init__(self, config, runtime, services)
|
||||
StartupABC.__init__(self)
|
||||
|
||||
self._configuration = config
|
||||
self._application_runtime = runtime
|
||||
self._services = services
|
||||
|
||||
self._application_runtime.set_runtime_directory(__file__)
|
||||
|
||||
|
@ -20,7 +20,11 @@ class StartupTemplate(TemplateFileABC):
|
||||
class Startup(StartupABC):
|
||||
|
||||
def __init__(self, config: ConfigurationABC, runtime: ApplicationRuntimeABC, services: ServiceProviderABC):
|
||||
StartupABC.__init__(self, config, runtime, services)
|
||||
StartupABC.__init__(self)
|
||||
|
||||
self._configuration = config
|
||||
self._application_runtime = runtime
|
||||
self._services = services
|
||||
|
||||
def configure_configuration(self) -> ConfigurationABC:
|
||||
return self._configuration
|
||||
|
@ -14,7 +14,11 @@ from cpl.utils.credential_manager import CredentialManager
|
||||
class Startup(StartupABC):
|
||||
|
||||
def __init__(self, config: ConfigurationABC, runtime: ApplicationRuntimeABC, services: ServiceProviderABC):
|
||||
StartupABC.__init__(self, config, runtime, services)
|
||||
StartupABC.__init__(self)
|
||||
|
||||
self._configuration = config
|
||||
self._application_runtime = runtime
|
||||
self._services = services
|
||||
|
||||
def configure_configuration(self) -> ConfigurationABC:
|
||||
self._configuration.add_environment_variables('PYTHON_')
|
||||
|
Loading…
Reference in New Issue
Block a user