gh-135227: argparse: Use help as default description in add_parser#135236
gh-135227: argparse: Use help as default description in add_parser#135236Sonu0305 wants to merge 8 commits into
help as default description in add_parser#135236Conversation
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
StanFromIreland
left a comment
There was a problem hiding this comment.
This will need a blurb entry and test for the new behavior.
Thanks. edit: typo |
f340e36 to
904c5be
Compare
|
Please stop repeatedly force pushing, it confuses GitHub. |
Sorry. |
serhiy-storchaka
left a comment
There was a problem hiding this comment.
What is the way to restore the current behavior? I.e. to create a parser without description?
|
@Sonu0305 it's generally best to avoid force pushing once you've received feedback, since it makes it harder for reviewers to see what changed. PRs are squash merged anyway |
Sorry, I pushed a commit with wrong changes, hence I decided to force push, I will surely avoid this and keep in mind. |
New changes, help in a way, where |
|
What if the user wants help but no description? |
The user can set |
|
Yes, please add a test. Add also tests for either help or description are SUPPRESS. This needs also documentation, and it is difficult to find a good place for it, because |
|
This PR is stale because it has been open for 30 days with no activity. |
|
I'm going to close this as stale, since there's unaddressed feedback and this has been open for quite sometime. Happy to revisit if feedback is addressed. |
Fixes #135227
argparse._SubParsersAction.add_parsershould default todescriptionmatchinghelp#135227