diff --git a/lean/models/configuration.py b/lean/models/configuration.py index 23d25cf2..867abb29 100644 --- a/lean/models/configuration.py +++ b/lean/models/configuration.py @@ -121,8 +121,6 @@ def factory(config_json_object) -> 'Configuration': return BrokerageEnvConfiguration.factory(config_json_object) elif config_json_object["type"] == "oauth-token": return AuthConfiguration.factory(config_json_object) - elif config_json_object["type"] == "input-account-id": - return AccountIdsConfiguration.factory(config_json_object) else: raise ValueError( f'Undefined input method type {config_json_object["type"]}') @@ -421,40 +419,6 @@ 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(PromptUserInput, ChoiceUserInput): - - def __init__(self, config_json_object): - super().__init__(config_json_object) - - def factory(config_json_object) -> 'AccountIdsConfiguration': - """Creates an instance of the child classes. - - :param config_json_object: the json object dict with configuration info - :return: An instance of AuthConfiguration. - """ - if config_json_object["type"] == "input-account-id": - return AccountIdsConfiguration(config_json_object) - else: - raise ValueError( - f'Undefined input method type {config_json_object["type"]}') - - def ask_user_for_input(self, default_value, logger: Logger, hide_input: bool = False): - """Prompts user to provide input while validating the type of input - against the expected type - - :param default_value: The default to prompt to the user. - :param logger: The instance of logger class. - :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 == "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}") - - class FilterEnvConfiguration(BrokerageEnvConfiguration): """This class adds extra filters to user filters."""