Skip to content

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

Merged
serhiy-storchaka merged 8 commits into
python:mainfrom
savannahostrowski:gh-89819
Oct 15, 2024
Merged

gh-89819: Add argument_default and conflict_handler to add_argument_group docs#125379
serhiy-storchaka merged 8 commits into
python:mainfrom
savannahostrowski:gh-89819

Conversation

@savannahostrowski

@savannahostrowski savannahostrowski commented Oct 12, 2024

Copy link
Copy Markdown
Member

@savannahostrowski

Copy link
Copy Markdown
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
Copy Markdown
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.

Comment thread Doc/library/argparse.rst Outdated
Comment thread Doc/library/argparse.rst Outdated
Comment thread Doc/library/argparse.rst Outdated
Comment thread Doc/library/argparse.rst Outdated
Comment thread Doc/library/argparse.rst Outdated

@serhiy-storchaka serhiy-storchaka left a comment

Copy link
Copy Markdown
Member

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
@miss-islington-app

Copy link
Copy Markdown

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

bedevere-app Bot commented Oct 15, 2024

Copy link
Copy Markdown

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

bedevere-app Bot commented Oct 15, 2024

Copy link
Copy Markdown

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