[issue45690] Argparse exclusive group inside required exclusive group displays incorrectly

paul j3 report at bugs.python.org
Tue Nov 2 14:42:57 EDT 2021


paul j3 <ajipanca at gmail.com> added the comment:

https://bugs.python.org/issue29553
Argparser does not display closing parentheses in nested mutex groups

supposedly fixed the parentheses for nested groups.  You can read its discussion and patches to see why it does not handle your case.

I don't see any examples have required groups.  [] is used for un-required, () for required.  This patch did not change how the usage was generated.  It just refined how excess [()] were removed.

Proper handling of groups requires a major rewrite of the usage formatter.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45690>
_______________________________________


More information about the Python-bugs-list mailing list