-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
GH-122679: Add register()
to argparse docs
#126939
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
Conversation
@serhiy-storchaka If you have bandwidth, I'd love it if you could look at this one since you weighed in on the original issue. I debated expanding the section about custom type converters in the Tutorial instead, but it felt more correct to properly document |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple quick comments from somebody who doesn't have a deep knowledge of argparse internals (so feel free to ignore:-))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The argparse documentation is larger and may even look bloated. Please try to use more terse style.
Please add references to registry()
in the parts that describe custom type
and action
. Currently it it not even documented that the type
argument may be a name, not callable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. 👍
@brandtbucher as FYI :) |
Thanks @savannahostrowski for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12. |
Thanks @savannahostrowski for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13. |
* Add register() to argparse docs * Add newline * Formatting * Fix codeblock * Move section * Add signature * Add newline * Fix indent * Fix indent take 2 * Rephrase * Simplify language * Address PR comments * Add references to register in type and action * Remove unnecessary reference * Rephrase and add success case (cherry picked from commit fcfdb55) Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
* Add register() to argparse docs * Add newline * Formatting * Fix codeblock * Move section * Add signature * Add newline * Fix indent * Fix indent take 2 * Rephrase * Simplify language * Address PR comments * Add references to register in type and action * Remove unnecessary reference * Rephrase and add success case (cherry picked from commit fcfdb55) Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
GH-127148 is a backport of this pull request to the 3.12 branch. |
GH-127149 is a backport of this pull request to the 3.13 branch. |
Documentation and test changes are usually backported. This will help to backport more important chages. |
And please edit commit message before merging. The history of intermediate changes is not interesting. The commit message should only reflect the final result. |
* Add register() to argparse docs * Add newline * Formatting * Fix codeblock * Move section * Add signature * Add newline * Fix indent * Fix indent take 2 * Rephrase * Simplify language * Address PR comments * Add references to register in type and action * Remove unnecessary reference * Rephrase and add success case
'invalid %(type)s value: %(value)r'
error messages #122679📚 Documentation preview 📚: https://cpython-previews--126939.org.readthedocs.build/