From db4600c4d2ef7f10bc775eec89eaaca509ad3b1c Mon Sep 17 00:00:00 2001 From: Ankita Katiyar Date: Tue, 18 Jun 2024 18:45:30 +0100 Subject: [PATCH 1/2] Add default for env Signed-off-by: Ankita Katiyar --- kedro/framework/context/context.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kedro/framework/context/context.py b/kedro/framework/context/context.py index ddc197b65b..f8a92225f2 100644 --- a/kedro/framework/context/context.py +++ b/kedro/framework/context/context.py @@ -167,12 +167,12 @@ class KedroContext: project_path: Path = field(init=True, converter=_expand_full_path) config_loader: AbstractConfigLoader = field(init=True) - env: str | None = field(init=True) _package_name: str = field(init=True) _hook_manager: PluginManager = field(init=True) _extra_params: dict[str, Any] | None = field( init=True, default=None, converter=deepcopy ) + env: str | None = field(init=True, default=None) @property def catalog(self) -> DataCatalog: From 2cb3aba58b766e9c36407be89ea951d276edc596 Mon Sep 17 00:00:00 2001 From: Ankita Katiyar Date: Fri, 21 Jun 2024 09:28:49 +0100 Subject: [PATCH 2/2] Add defaults to other arguments as well Signed-off-by: Ankita Katiyar --- kedro/framework/context/context.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kedro/framework/context/context.py b/kedro/framework/context/context.py index f8a92225f2..46bc6d5906 100644 --- a/kedro/framework/context/context.py +++ b/kedro/framework/context/context.py @@ -167,12 +167,12 @@ class KedroContext: project_path: Path = field(init=True, converter=_expand_full_path) config_loader: AbstractConfigLoader = field(init=True) - _package_name: str = field(init=True) - _hook_manager: PluginManager = field(init=True) + env: str | None = field(init=True, default=None) + _package_name: str = field(init=True, default="") + _hook_manager: PluginManager | None = field(init=True, default=None) _extra_params: dict[str, Any] | None = field( init=True, default=None, converter=deepcopy ) - env: str | None = field(init=True, default=None) @property def catalog(self) -> DataCatalog: