Skip to content

Commit 9347d82

Browse files
committed
chore: re-word variable to match it's purpose
closes freqtrade#12013
1 parent 5e8bd35 commit 9347d82

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

freqtrade/commands/arguments.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,6 @@ def _parse_args(self) -> Namespace:
311311
# (see https://bugs.python.org/issue16399)
312312
# Allow no-config for certain commands (like downloading / plotting)
313313
if "config" in parsed_arg and parsed_arg.config is None:
314-
conf_required = "command" in parsed_arg and parsed_arg.command in NO_CONF_REQURIED
315-
316314
if "user_data_dir" in parsed_arg and parsed_arg.user_data_dir is not None:
317315
user_dir = parsed_arg.user_data_dir
318316
else:
@@ -325,7 +323,9 @@ def _parse_args(self) -> Namespace:
325323
else:
326324
# Else use "config.json".
327325
cfgfile = Path.cwd() / DEFAULT_CONFIG
328-
if cfgfile.is_file() or not conf_required:
326+
conf_optional = "command" in parsed_arg and parsed_arg.command in NO_CONF_REQURIED
327+
if cfgfile.is_file() or not conf_optional:
328+
# Only inject config if the file exists, or if the config is optional
329329
parsed_arg.config = [DEFAULT_CONFIG]
330330

331331
return parsed_arg

0 commit comments

Comments
 (0)