-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
gh-121151: Fix wrapping of long usage text of arguments inside a mutually exclusive groups in argparse #121159
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
…lly exclusive groups
Looks like this patch differs from what the behavior used to be. On older versions, the
But on this patch, it looks like this:
|
No this was changed in Python 3.9. Which version did you use for testing? |
It might have been 3.8, oops! |
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, then.
@encukou sorry to tag you again but if you could please take a look at this PR it would be great to get it merged before the final release of 3.13 as it fixes a 3.13 regression. |
Looks good, thank you! |
…ts inside a mutually exclusive groups (pythonGH-121159) (cherry picked from commit 013a092) Co-authored-by: Ali Hamdan <[email protected]>
GH-122777 is a backport of this pull request to the 3.13 branch. |
…ts inside a mutually exclusive groups (pythonGH-121159)
See the linked issue for the details. The fix here is to not group the arguments in a mutually exclusive group in a single string but to keep them separate so that they can be wrapped if necessary.