From 531fa104c8ddd6dcaa28d9dcf4e4f418fd19e65c Mon Sep 17 00:00:00 2001 From: Diogo Sousa Date: Wed, 26 Jul 2023 14:32:00 +0100 Subject: [PATCH] rename method and add description --- openbb_sdk/sdk/core/openbb_core/app/command_runner.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 8f7db8c6eff..d8244b5c3be 100644 --- a/openbb_sdk/sdk/core/openbb_core/app/command_runner.py +++ b/openbb_sdk/sdk/core/openbb_core/app/command_runner.py @@ -242,9 +242,10 @@ class StaticCommandRunner: return result @classmethod - def __execute( + def __command( cls, system_settings: SystemSettings, func: Callable, kwargs: Dict[str, Any] ) -> CommandOutput: + """Run a command and return the output""" try: context_manager: Union[warnings.catch_warnings, ContextManager[None]] = ( warnings.catch_warnings(record=True) @@ -283,6 +284,7 @@ class StaticCommandRunner: route: str, **kwargs, ) -> None: + """Create a chart from the command output""" try: command_output.chart = cls.charting_manager.chart( user_settings=user_settings, @@ -305,6 +307,7 @@ class StaticCommandRunner: func: Callable, kwargs: Dict[str, Any], ) -> CommandOutput: + """Execute a function and return the output""" user_settings = execution_context.user_settings system_settings = execution_context.system_settings @@ -329,7 +332,7 @@ class StaticCommandRunner: # commands.py and the function signature does not expect "chart" kwargs.pop("chart", None) - command_output = cls.__execute( + command_output = cls.__command( system_settings=system_settings, func=func, kwargs=kwargs,