-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Add new Python 3.14 argparse.ArgumentParser
constructor parameters
#13947
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
Add new Python 3.14 argparse.ArgumentParser
constructor parameters
#13947
Conversation
These are - `suggest_on_error`, added by python/cpython#124456, made keyword-only by python/cpython#133302 - `color`, added by python/cpython#132323
Our policy is generally to not add features for new Python versions until the first beta, but that's tomorrow so I think it's fine to get this in. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
stdlib/argparse.pyi
Outdated
suggest_on_error: bool = ..., | ||
color: bool = ..., |
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.
suggest_on_error: bool = ..., | |
color: bool = ..., | |
suggest_on_error: bool = False, | |
color: bool = False, |
I think we didn't fill in defaults here because at runtime they go through **kwargs
. Let's add defaults for the new parameters at least, and if you like we can add defaults for the rest at some point too.
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.
Would you prefer if I add the missing defaults in this PR or in a separate one?
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.
Let's do it in another PR, I'll merge this one
Co-authored-by: Jelle Zijlstra <[email protected]>
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
These are
suggest_on_error
, added by GH-99749: Add optional feature to suggest correct names (ArgumentParser) cpython#124456, made keyword-only by gh-133300: argparse: makesuggest_on_error
a keyword-only parameter cpython#133302color
, added by gh-130645: Add colour toargparse
help cpython#132323