[issue34479] ArgumentParser subparser error display at the wrong level

2018-09-22 Thread paul j3
Change by paul j3 : -- resolution: -> not a bug ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34479] ArgumentParser subparser error display at the wrong level

2018-09-20 Thread paul j3
Change by paul j3 : -- stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue34479] ArgumentParser subparser error display at the wrong level

2018-08-28 Thread paul j3
paul j3 added the comment: Errors that are associated with a specific argument, such as a wrong 'type' do get usage from the appropriate subparser. e.g. In [164]: p.parse_args('--foo 1 cmd1 --bar x'.split()) usage: ipython3 cmd1 [-h] [--bar BAR] ipython3 cmd1: error: argument --bar:

[issue34479] ArgumentParser subparser error display at the wrong level

2018-08-28 Thread paul j3
paul j3 added the comment: The subparser is called with `parse_known_args` which just puts unknown args in a _UNRECOGNIZED_ARGS_ATTR attribute slot in the namespace, which is then passed back to the main parser. (this occurs in _SubParsersAction.__call__) If `parser.parse_known_args` is

[issue34479] ArgumentParser subparser error display at the wrong level

2018-08-23 Thread Siming Yuan
New submission from Siming Yuan : If you take the example from https://docs.python.org/3/library/argparse.html#argparse.ArgumentParser.add_subparsers # create the top-level parser parser = argparse.ArgumentParser(prog='PROG') parser.add_argument('--foo', action='store_true', help='foo help')