-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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-83897: Raise on conflicting subparser names. #18605
gh-83897: Raise on conflicting subparser names. #18605
Conversation
Raise an ArgumentError when the same subparser name is added twice to an ArgumentParser. This is consistent with the (default) behavior when the same option string is added twice to an ArgumentParser. (Support for `conflict_handler="resolve"` could be considered as a followup feature, although real use cases seem even rarer than "resolve"ing option-strings.)
@@ -0,0 +1,3 @@ | |||
Raise an ArgumentError when the same subparser name is added twice to an |
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.
How about using added twice or more
to replace added twice
?
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.
You won't be able to add it more than twice if it errors out on the second addition...
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.
make sense.
@rhettinger Hi, raymond. Pls review this PR if you have free time.
Sorry, I can't merge this PR. Reason: |
@anntzer: Status check is done, and it's a success ✅ . |
1 similar comment
@anntzer: Status check is done, and it's a success ✅ . |
Sorry, I can't merge this PR. Reason: |
@anntzer: Status check is done, and it's a success ✅ . |
Sorry, I can't merge this PR. Reason: |
1 similar comment
Sorry, I can't merge this PR. Reason: |
@anntzer: Status check is done, and it's a success ✅ . |
Don't register again the retire command as it is already done by pyrpkg. Starting Python 3.11, it creates an error. See python/cpython#18605 Fix rpmfusion-infra#24
Don't register again the retire command as it is already done by pyrpkg. Starting Python 3.11, it creates an error. See python/cpython#18605 Fix #24
Raise an ArgumentError when the same subparser name is added twice to an
ArgumentParser. This is consistent with the (default) behavior when the
same option string is added twice to an ArgumentParser.
(Support for
conflict_handler="resolve"
could be considered as afollowup feature, although real use cases seem even rarer than
"resolve"ing option-strings.)
Automerge-Triggered-By: GH:rhettinger