馃悰 fix: heading for argument groups without a title - #350
Merged
Conversation
gaborbernat
force-pushed
the
group-untitled
branch
5 times, most recently
from
August 27, 2026 16:16
1c34d85 to
7e90655
Compare
An argument group created with only a description rendered its heading as the program name followed by nothing, because the title was None, and every such group shared the label tool-None; two of them raised a duplicate label warning that fails builds run with -W. The description now serves as the heading when the title is missing, and a group with neither falls back to "arguments", so each section keeps a distinct, stable anchor. Titled groups are untouched.
gaborbernat
force-pushed
the
group-untitled
branch
from
August 27, 2026 16:23
7e90655 to
68cbf4e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
parser.add_argument_group(description="only a description")has no title, and the directive rendered it as a heading readingtoolwith the anchortool-None. A second untitled group produced a duplicate label warning on top, which fails any build running with-W. 馃悰An untitled group now takes its description as the heading text, so
tool only a descriptionandtool anotherget distinct anchors and the description no longer repeats as a paragraph under the heading. A group with neither title nor description falls back toarguments, giving it the stable anchortool-arguments. Titled groups render as before.