mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
bpo-26952: [argparse] clearer error when formatting an empty mutually… (GH-30099)
This commit is contained in:
parent
f54fee7f37
commit
86de99588d
3 changed files with 11 additions and 0 deletions
|
@ -392,6 +392,9 @@ class HelpFormatter(object):
|
|||
group_actions = set()
|
||||
inserts = {}
|
||||
for group in groups:
|
||||
if not group._group_actions:
|
||||
raise ValueError(f'empty group {group}')
|
||||
|
||||
try:
|
||||
start = actions.index(group._group_actions[0])
|
||||
except ValueError:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue