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

Appearance settings

gh-89819: Add argument_default and conflict_handler to add_argument_group docs #125379

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

Merged
merged 8 commits into from
Oct 15, 2024

Conversation

savannahostrowski
Copy link
Member

@savannahostrowski savannahostrowski commented Oct 12, 2024

@savannahostrowski
Copy link
Member Author

@serhiy-storchaka I think this covers the bases described in the issue, but if you have something more substantial in mind, please let me know.

@serhiy-storchaka
Copy link
Member

It is a little more complex.

  • These parameters are keyword-only. Add the * marker before them.
  • None is not their default value. Actually, their default values cannot be expressed in a syntax of Python function declaration, because they are current values of the parser. We can use brackets, like in add_argument() and add_subparsers().
  • These parameters should be at least barely mentioned in the following description. Not necessary to add a bullet list for all parameters. But there should be references to corresponding descriptions of the parser parameters, with possible description of the differences (or say that they are the same). This is the only non-trivial part.

Doc/library/argparse.rst Outdated Show resolved Hide resolved
Doc/library/argparse.rst Outdated Show resolved Hide resolved
Doc/library/argparse.rst Outdated Show resolved Hide resolved
Doc/library/argparse.rst Outdated Show resolved Hide resolved
Doc/library/argparse.rst Outdated Show resolved Hide resolved
Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

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

LGTM.

@serhiy-storchaka serhiy-storchaka enabled auto-merge (squash) October 15, 2024 15:29
@serhiy-storchaka serhiy-storchaka added needs backport to 3.12 only security fixes needs backport to 3.13 bugs and security fixes labels Oct 15, 2024
@serhiy-storchaka serhiy-storchaka merged commit c9826c1 into python:main Oct 15, 2024
27 checks passed
@miss-islington-app
Copy link

Thanks @savannahostrowski for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 15, 2024
…ment_group() docs (pythonGH-125379)

(cherry picked from commit c9826c1)

Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 15, 2024
…ment_group() docs (pythonGH-125379)

(cherry picked from commit c9826c1)

Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
@bedevere-app
Copy link

bedevere-app bot commented Oct 15, 2024

GH-125538 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Oct 15, 2024
@bedevere-app
Copy link

bedevere-app bot commented Oct 15, 2024

GH-125539 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 only security fixes label Oct 15, 2024
serhiy-storchaka pushed a commit that referenced this pull request Oct 15, 2024
…ument_group() docs (GH-125379) (GH-125538)

(cherry picked from commit c9826c1)

Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
serhiy-storchaka pushed a commit that referenced this pull request Oct 15, 2024
…ument_group() docs (GH-125379) (GH-125539)

(cherry picked from commit c9826c1)

Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
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.

2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.