Skip to content
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

gh-99735: Use required=True in argparse subparsers example #100927

Merged
merged 1 commit into from Feb 19, 2023

Conversation

ppaez
Copy link
Contributor

@ppaez ppaez commented Jan 10, 2023

This provides an alternate solution, suggested by @hpaulj to improve the example in the documentation.

Copy link
Contributor

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

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

Thanks! While the history of the required parameter looks long and sad, I agree that required=True is what most users should default to doing.

@hauntsaninja hauntsaninja changed the title gh-99735: Make providing a sub-command mandatory gh-99735: Use required=True in argparse subparsers example Feb 19, 2023
@hauntsaninja hauntsaninja merged commit 6aab56f into python:main Feb 19, 2023
15 checks passed
@miss-islington
Copy link
Contributor

Thanks @ppaez for the PR, and @hauntsaninja for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11.
🐍🍒🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 19, 2023
…honGH-100927)

(cherry picked from commit 6aab56f)

Co-authored-by: Patricio Paez <nospam@pp.com.mx>
@bedevere-bot
Copy link

GH-102036 is a backport of this pull request to the 3.11 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 19, 2023
…honGH-100927)

(cherry picked from commit 6aab56f)

Co-authored-by: Patricio Paez <nospam@pp.com.mx>
@bedevere-bot
Copy link

GH-102037 is a backport of this pull request to the 3.10 branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants