László Attila Tóth <[email protected]> added the comment:
Sorry, these are two bugs in fact. The current one, the help with minmal code:
import argparse
parser = argparse.ArgumentParser()
grp = parser.add_argument_group('Database settings')
grp.add_argument('--db-config')
xgrp = grp.add_argument_group()
xgrp.add_argument('--db-password')
parser.parse_args(['-h'])
The group's help output shows only --db-config option:
Database settings:
--db-config DB_CONFIG
If I change the xgrp to be mutually exclusive group as:
xgrp = grp.add_mutually_exclusive_group()
then the output is the same as I expect for the previous code, too:
Database settings:
--db-config DB_CONFIG
--db-password DB_PASSWORD
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue46057>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com