From 2f92e9909d568d70affd7bfe02503f8cdc3d7d24 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Mon, 4 Oct 2021 10:21:50 +0200 Subject: [PATCH] Improved env --- src/cpl_cli/_templates/new/console/source/name/startup.py | 7 ++++--- src/cpl_cli/_templates/new/library/source/name/startup.py | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/cpl_cli/_templates/new/console/source/name/startup.py b/src/cpl_cli/_templates/new/console/source/name/startup.py index 9511ac40..9bbcf00b 100644 --- a/src/cpl_cli/_templates/new/console/source/name/startup.py +++ b/src/cpl_cli/_templates/new/console/source/name/startup.py @@ -14,21 +14,22 @@ class StartupTemplate(TemplateFileABC): from cpl_core.application import StartupABC from cpl_core.configuration import ConfigurationABC from cpl_core.dependency_injection import ServiceProviderABC, ServiceCollectionABC + from cpl_core.environment import ApplicationEnvironment class Startup(StartupABC): - def __init__(self, config: ConfigurationABC, services: ServiceCollectionABC): + def __init__(sel): StartupABC.__init__(self) self._configuration = config self._environment = self._configuration.environment self._services = services - def configure_configuration(self) -> ConfigurationABC: + def configure_configuration(self, configuration: ConfigurationABC, environment: ApplicationEnvironment) -> ConfigurationABC: return self._configuration - def configure_services(self) -> ServiceProviderABC: + def configure_services(self, services: ServiceCollectionABC, environment: ApplicationEnvironment) -> ServiceProviderABC: return self._services.build_service_provider() """) diff --git a/src/cpl_cli/_templates/new/library/source/name/startup.py b/src/cpl_cli/_templates/new/library/source/name/startup.py index 9511ac40..9bbcf00b 100644 --- a/src/cpl_cli/_templates/new/library/source/name/startup.py +++ b/src/cpl_cli/_templates/new/library/source/name/startup.py @@ -14,21 +14,22 @@ class StartupTemplate(TemplateFileABC): from cpl_core.application import StartupABC from cpl_core.configuration import ConfigurationABC from cpl_core.dependency_injection import ServiceProviderABC, ServiceCollectionABC + from cpl_core.environment import ApplicationEnvironment class Startup(StartupABC): - def __init__(self, config: ConfigurationABC, services: ServiceCollectionABC): + def __init__(sel): StartupABC.__init__(self) self._configuration = config self._environment = self._configuration.environment self._services = services - def configure_configuration(self) -> ConfigurationABC: + def configure_configuration(self, configuration: ConfigurationABC, environment: ApplicationEnvironment) -> ConfigurationABC: return self._configuration - def configure_services(self) -> ServiceProviderABC: + def configure_services(self, services: ServiceCollectionABC, environment: ApplicationEnvironment) -> ServiceProviderABC: return self._services.build_service_provider() """)