-
-
Notifications
You must be signed in to change notification settings - Fork 33.6k
gh-138697: Fix inferring dest from a single-dash long option in argparse #138699
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-138697: Fix inferring dest from a single-dash long option in argparse #138699
Conversation
… argparse If a short option and a single-dash long option are passed to add_argument(), dest is now inferred from the single-dash long option.
9987fa1 to
426169f
Compare
savannahostrowski
left a comment
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.
Overall, I am supportive of making dest more consistent so thanks for opening this issue and PR. However, there is one edge case that still needs to be addressed.
|
When you're done making the requested changes, leave the comment: |
|
I have made the requested changes; please review again. |
|
Thanks for making the requested changes! @savannahostrowski: please review the changes made to this pull request. |
savannahostrowski
left a comment
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! Thanks for this!
… argparse (python#138699) * pythongh-138697: Fix inferring dest from a single-dash long option in argparse If a short option and a single-dash long option are passed to add_argument(), dest is now inferred from the single-dash long option. * Make double-dash options taking priority over single-dash long options. --------- Co-authored-by: Savannah Ostrowski <[email protected]>
… argparse (python#138699) * pythongh-138697: Fix inferring dest from a single-dash long option in argparse If a short option and a single-dash long option are passed to add_argument(), dest is now inferred from the single-dash long option. * Make double-dash options taking priority over single-dash long options. --------- Co-authored-by: Savannah Ostrowski <[email protected]>
If a short option and a single-dash long option are passed to add_argument(), dest is now inferred from the single-dash long option.
📚 Documentation preview 📚: https://cpython-previews--138699.org.readthedocs.build/