It seems that the way how an is_config_file option is processed does not honour the allow_abbrev setting when parsing allowing unknown args and instead uses (and splits?) an unknown option that is a prefix of a known option.
This will terminate in the parse_known_args(args) call showing the usage and
the error message "error: File not found: 2"
However, if the same option is used without the is_config_file_arg=True setting, everthing works as expected and the "--comp" option is correctly ignored.
This happens because in line 725, new instances of argparse.ArgumentParser are created without passing on the allow_abbrev setting, so this setting is set to the default of True.
It seems that the way how an
is_config_file
option is processed does not honour theallow_abbrev
setting when parsing allowing unknown args and instead uses (and splits?) an unknown option that is a prefix of a known option.Here is example code:
This will terminate in the
parse_known_args(args)
call showing the usage and the error message "error: File not found: 2"However, if the same option is used without the
is_config_file_arg=True
setting, everthing works as expected and the "--comp" option is correctly ignored.