From 9347d823fc52975f6c69028b9b06c4776b4cac9f Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 21 Jul 2025 21:08:42 +0200 Subject: [PATCH] chore: re-word variable to match it's purpose closes #12013 --- freqtrade/commands/arguments.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/freqtrade/commands/arguments.py b/freqtrade/commands/arguments.py index 2e3de0a98..dd3df9ded 100755 --- a/freqtrade/commands/arguments.py +++ b/freqtrade/commands/arguments.py @@ -311,8 +311,6 @@ class Arguments: # (see https://bugs.python.org/issue16399) # Allow no-config for certain commands (like downloading / plotting) if "config" in parsed_arg and parsed_arg.config is None: - conf_required = "command" in parsed_arg and parsed_arg.command in NO_CONF_REQURIED - if "user_data_dir" in parsed_arg and parsed_arg.user_data_dir is not None: user_dir = parsed_arg.user_data_dir else: @@ -325,7 +323,9 @@ class Arguments: else: # Else use "config.json". cfgfile = Path.cwd() / DEFAULT_CONFIG - if cfgfile.is_file() or not conf_required: + conf_optional = "command" in parsed_arg and parsed_arg.command in NO_CONF_REQURIED + if cfgfile.is_file() or not conf_optional: + # Only inject config if the file exists, or if the config is optional parsed_arg.config = [DEFAULT_CONFIG] return parsed_arg