chore: re-word variable to match it's purpose

closes #12013
This commit is contained in:
Matthias
2025-07-21 21:08:42 +02:00
parent 5e8bd359c8
commit 9347d823fc

View File

@@ -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