Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-135227: argparse: Usehelp as defaultdescription inadd_parser#135236

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
Sonu0305 wants to merge8 commits intopython:main
base:main
Choose a base branch
Loading
fromSonu0305:fix_parser

Conversation

Sonu0305
Copy link

@Sonu0305Sonu0305 commentedJun 7, 2025
edited by bedevere-appbot
Loading

gsnedders reacted with hooray emoji
@python-cla-bot
Copy link

python-cla-botbot commentedJun 7, 2025
edited
Loading

All commit authors signed the Contributor License Agreement.

CLA signed

@bedevere-app
Copy link

Most changes to Pythonrequire a NEWS entry. Add one using theblurb_it web app or theblurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply theskip news label instead.

Copy link
Member

@StanFromIrelandStanFromIreland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This will need a blurb entry and test for the new behavior.

Sonu0305 and ZeroIntensity reacted with thumbs up emoji
@Sonu0305
Copy link
Author

Sonu0305 commentedJun 7, 2025
edited
Loading

This will need a blurb entry and test for the new behavior.

Thanks.

edit: typo

@Sonu0305Sonu0305force-pushed thefix_parser branch 2 times, most recently fromf340e36 to904c5beCompareJune 8, 2025 13:23
@StanFromIreland
Copy link
Member

Please stop repeatedly force pushing, it confuses GitHub.

Sonu0305 reacted with thumbs up emoji

@Sonu0305
Copy link
Author

Please stop repeatedly force pushing, it confuses GitHub.

Sorry.

Copy link
Member

@serhiy-storchakaserhiy-storchaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

What is the way to restore the current behavior? I.e. to create a parser without description?

@brianschubert
Copy link
Member

@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

@Sonu0305
Copy link
Author

@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.
Sorry & Thanks again.

@Sonu0305
Copy link
Author

What is the way to restore the current behavior? I.e. to create a parser without description?

New changes, help in a way, wheredescription is set to default only whenhelp is notNone, and the user does not providedescription explicitly.
Let me know if this is the expected behaviour,
Thank You.

@serhiy-storchaka
Copy link
Member

What if the user wants help but no description?

@Sonu0305
Copy link
Author

Sonu0305 commentedJun 11, 2025
edited
Loading

What if the user wants help but no description?

The user can setdescription toNone.
I can add tests for this case as well.
And if required, we can document it as well.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@savannahostrowskisavannahostrowskiAwaiting requested review from savannahostrowskisavannahostrowski is a code owner

@StanFromIrelandStanFromIrelandAwaiting requested review from StanFromIreland

@brianschubertbrianschubertAwaiting requested review from brianschubert

@serhiy-storchakaserhiy-storchakaAwaiting requested review from serhiy-storchaka

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

argparse._SubParsersAction.add_parser should default todescription matchinghelp
4 participants
@Sonu0305@StanFromIreland@brianschubert@serhiy-storchaka

[8]ページ先頭

©2009-2025 Movatter.jp