From 1e19e45340988a5ca7cddcdc4aaab77b3755ecb7 Mon Sep 17 00:00:00 2001 From: hjoaquim Date: Mon, 28 Aug 2023 15:21:52 +0100 Subject: [PATCH] unbreaking changes --- openbb_sdk/sdk/core/openbb_core/app/command_runner.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openbb_sdk/sdk/core/openbb_core/app/command_runner.py b/openbb_sdk/sdk/core/openbb_core/app/command_runner.py index 666b29ea3bb..e4e79afbbaa 100644 --- a/openbb_sdk/sdk/core/openbb_core/app/command_runner.py +++ b/openbb_sdk/sdk/core/openbb_core/app/command_runner.py @@ -94,12 +94,14 @@ class ParametersBuilder: @staticmethod def update_command_context( + func: Callable, kwargs: Dict[str, Any], system_settings: SystemSettings, user_settings: UserSettings, ) -> Dict[str, Any]: """Update the command context with the available user and system settings.""" - if "cc" in kwargs: + argcount = func.__code__.co_argcount + if "cc" in func.__code__.co_varnames[:argcount]: kwargs["cc"] = CommandContext( user_settings=user_settings, system_settings=system_settings, @@ -202,6 +204,7 @@ class ParametersBuilder: kwargs=kwargs, ) kwargs = cls.update_command_context( + func=func, kwargs=kwargs, system_settings=system_settings, user_settings=user_settings,