-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
gh-84116: Docs: Document help and aliases for argparse.add_parser() #140574
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…python into doc-fix-140281
57a35b9 to
343648b
Compare
StanFromIreland
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There seem to be two different things mixed in this PR, please split it.
ce36e2d to
10dffc6
Compare
Misc/NEWS.d/next/Documentation/2025-10-25-14-08-42.gh-issue-84116.lKcoHw.rst
Show resolved
Hide resolved
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
a7913cf to
1a5c449
Compare
|
I have made the requested changes; please review again. |
|
Thanks for making the requested changes! @picnixz, @savannahostrowski: please review the changes made to this pull request. |
savannahostrowski
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the updates. A few comments:
- Can we make
add_parsera top-level method directive rather than nesting it underadd_subparsers? Right now it's a bit muddled. I think placing it around line 1807 (after theadd_subparsersexamples) would work well. - Related to the last point, the existing sections about
add_parseraliasesanddeprecatedfurther down in the docs are now redundant. We can remove those paragraphs and incorporate the content/examples into the newadd_parserdocumentation.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase And if you don't make the requested changes, you will be put in the comfy chair! |
|
Hi @savannahostrowski ,@picnixz I have made the requested changes; please review again. |
|
Thanks for making the requested changes! @savannahostrowski, @picnixz: please review the changes made to this pull request. |
|
Hi @savannahostrowski , @picnixz i have done all the changes according to your message been waiting for any further changes. |
gh-84116: Doc: update the argparse documentation to clearly define the help and aliases parameters for add_parser() and added the required news file for this change.
Doc/library/argparse.rst
Replaced the vague, single-sentence description of _SubParsersAction.add_parser with a formal .. method:: directive.
This new directive explicitly lists help and aliases as parameters, along with descriptions of what they do.
Removed the old, redundant paragraphs about help (which was in parentheses) and aliases (which was a "Furthermore..." note) from later in the document. This centralizes all the information in one logical place.
Misc/NEWS.d/next/Library/...
Added the required "blurb" file to log this documentation fix.
📚 Documentation preview 📚: https://cpython-previews--140574.org.readthedocs.build/