You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Argparse allows you to use -- to specify the end of optional arguments and begin parsing positional arguments. This is handy if you have an optional argument that takes a list of values. ConfigArgParse seems to fail to handle this when using a configuration. Consider this trivial example:
You can always place the config file last to make sure you don't end with an optional list before the positional arguments, but I think it would be nice to handle this case.
The text was updated successfully, but these errors were encountered:
Argparse allows you to use
--
to specify the end of optional arguments and begin parsing positional arguments. This is handy if you have an optional argument that takes a list of values. ConfigArgParse seems to fail to handle this when using a configuration. Consider this trivial example:A program (
test.py
):And a config file (
test.toml
) with:Passing the optional list works on command line. Note that the
--
is needed here to separate the positional arg from the optional listAnd passing the config file also works, while overriding the list also works.
However, using
--
while just using the config option fails. It works if you omit the--
but there may be other optional lists you want to override.You can always place the config file last to make sure you don't end with an optional list before the positional arguments, but I think it would be nice to handle this case.
The text was updated successfully, but these errors were encountered: