From ed7870f3cb42d42cc55aba92c43acb142c2d5dda Mon Sep 17 00:00:00 2001 From: Romazes Date: Thu, 19 Sep 2024 23:27:07 +0300 Subject: [PATCH] feat: support Prompt in AccountIdsConfiguration --- lean/models/configuration.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lean/models/configuration.py b/lean/models/configuration.py index 7faf5334..23d25cf2 100644 --- a/lean/models/configuration.py +++ b/lean/models/configuration.py @@ -421,7 +421,7 @@ def ask_user_for_input(self, default_value, logger: Logger, hide_input: bool = F raise ValueError(f'user input not allowed with {self.__class__.__name__}') -class AccountIdsConfiguration(ChoiceUserInput): +class AccountIdsConfiguration(PromptUserInput, ChoiceUserInput): def __init__(self, config_json_object): super().__init__(config_json_object) @@ -447,7 +447,9 @@ def ask_user_for_input(self, default_value, logger: Logger, hide_input: bool = F :param hide_input: Whether to hide the input (not used for this type of input, which is never hidden). :return: The value provided by the user. """ - if self._input_method == "choice": + if self._input_method == "prompt": + return PromptUserInput.ask_user_for_input(self, default_value, logger) + elif self._input_method == "choice": return ChoiceUserInput.ask_user_for_input(self, default_value, logger) else: raise ValueError(f"Undefined input method type {self._input_method}")