mirror of https://github.com/streamlink/streamlink
docs: skip groups with only suppressed actions
This commit is contained in:
parent
bf4ff71003
commit
f39eb13b8c
|
@ -157,7 +157,7 @@ class ArgparseDirective(Directive):
|
||||||
for group in parser.NESTED_ARGUMENT_GROUPS[parent]:
|
for group in parser.NESTED_ARGUMENT_GROUPS[parent]:
|
||||||
is_parent = group in parser.NESTED_ARGUMENT_GROUPS
|
is_parent = group in parser.NESTED_ARGUMENT_GROUPS
|
||||||
# Exclude empty groups
|
# Exclude empty groups
|
||||||
if not group._group_actions and not is_parent:
|
if not is_parent and not any(action.help != argparse.SUPPRESS for action in group._group_actions or []):
|
||||||
continue
|
continue
|
||||||
title = group.title
|
title = group.title
|
||||||
yield ""
|
yield ""
|
||||||
|
|
Loading…
Reference in New Issue