Change that the args overload has to be set to override settings from arguments

So we do not have issues with values change because an arugment has the same name as a setting name
This commit is contained in:
Clemens Schwaighofer
2025-11-20 10:00:36 +09:00
parent a00c27c465
commit 4ffe372434
4 changed files with 37 additions and 37 deletions

View File

@@ -1,5 +1,6 @@
[TestA]
foo=bar
overload_from_args=bar
foobar=1
bar=st
arg_overload=should_not_be_set_because_of_command_line_is_list

View File

@@ -39,7 +39,7 @@ def main():
sl = SettingsLoader(
{
'foo': 'OVERLOAD',
'overload_from_args': 'OVERLOAD from ARGS',
'arg_overload': ['should', 'not', 'be', 'set'],
'arg_overload_list': ['overload', 'this', 'list'],
'arg_overload_not_set': "DO_NOT_SET",
@@ -53,11 +53,11 @@ def main():
config_load,
{
# "doesnt": ["split:,"],
"foo": ["mandatory:yes"],
"overload_from_args": ["args_override:yes", "mandatory:yes"],
"foobar": ["check:int"],
"bar": ["mandatory:yes"],
"arg_overload_list": ["split:,",],
"arg_overload_not_set": ["args:no"],
"arg_overload_list": ["args_override:yes", "split:,",],
"arg_overload_not_set": [],
"some_match": ["matching:foo|bar"],
"some_match_list": ["split:,", "matching:foo|bar"],
"test_list": [