From 5ce63cd54a33098b298da5b8d4c9177828a8e025 Mon Sep 17 00:00:00 2001 From: Matthias Date: Wed, 4 Sep 2019 16:39:23 +0200 Subject: [PATCH] Remove no_config_ argument from Arguments --- freqtrade/configuration/arguments.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/freqtrade/configuration/arguments.py b/freqtrade/configuration/arguments.py index a8cd6686b..addbfcf67 100644 --- a/freqtrade/configuration/arguments.py +++ b/freqtrade/configuration/arguments.py @@ -47,11 +47,10 @@ class Arguments(object): """ Arguments Class. Manage the arguments received by the cli """ - def __init__(self, args: Optional[List[str]], no_default_config: bool = False) -> None: + def __init__(self, args: Optional[List[str]]) -> None: self.args = args self._parsed_arg: Optional[argparse.Namespace] = None self.parser = argparse.ArgumentParser(description='Free, open source crypto trading bot') - self._no_default_config = no_default_config def _load_args(self) -> None: self._build_args(optionlist=ARGS_MAIN) @@ -77,7 +76,7 @@ class Arguments(object): # Workaround issue in argparse with action='append' and default value # (see https://bugs.python.org/issue16399) # Allow no-config for certain commands (like downloading / plotting) - if (not self._no_default_config and parsed_arg.config is None + if (parsed_arg.config is None and not ('subparser' in parsed_arg and parsed_arg.subparser in NO_CONF_REQURIED)): parsed_arg.config = [constants.DEFAULT_CONFIG]