Skip to content
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-87041: Fix incorrect indentation in argparse help #124230

Merged
merged 16 commits into from
Sep 23, 2024

Conversation

savannahostrowski
Copy link
Member

@savannahostrowski savannahostrowski commented Sep 19, 2024

This PR effectively re-opens #24177, which appears to be the correct fix but never got reviewed (I'm in the process of cleaning up some argparse bugs and noticed the corresponding issue still open).

@savannahostrowski savannahostrowski changed the title bpo-42875: fix incorrect indent of long sub-commands GH-87041: fix incorrect indent of long sub-commands Sep 19, 2024
@savannahostrowski savannahostrowski changed the title GH-87041: fix incorrect indent of long sub-commands GH-87041: Fix incorrect indentation in argparse help Sep 19, 2024
@savannahostrowski savannahostrowski added 3.12 bugs and security fixes 3.13 bugs and security fixes needs backport to 3.12 bug and security fixes needs backport to 3.13 bugs and security fixes and removed 3.12 bugs and security fixes 3.13 bugs and security fixes labels Sep 19, 2024
Lib/test/test_argparse.py Outdated Show resolved Hide resolved
Lib/test/test_argparse.py Outdated Show resolved Hide resolved
Lib/test/test_argparse.py Outdated Show resolved Hide resolved
Lib/test/test_argparse.py Outdated Show resolved Hide resolved
Lib/test/test_argparse.py Outdated Show resolved Hide resolved
Lib/test/test_argparse.py Outdated Show resolved Hide resolved
Lib/test/test_argparse.py Outdated Show resolved Hide resolved
Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@savannahostrowski, did you add the author of the original PR as a co-author?

Lib/test/test_argparse.py Show resolved Hide resolved
Co-authored-by: Serhiy Storchaka <[email protected]>
@savannahostrowski
Copy link
Member Author

@serhiy-storchaka I applied the patch so that the original author is attributed in the commits. Would you like me to amend the news entry?

@serhiy-storchaka
Copy link
Member

serhiy-storchaka commented Sep 23, 2024

Would you like me to amend the news entry?

This is not needed. If you did not mentioned them in the commit message, I would add the Co-authored-by line.

@serhiy-storchaka serhiy-storchaka enabled auto-merge (squash) September 23, 2024 19:19
@serhiy-storchaka
Copy link
Member

Thank you @savannahostrowski for reviving activity on the argparse issues.

@miss-islington-app
Copy link

Thanks @savannahostrowski for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 23, 2024
…124230)

In case of usage a long command along with max_help_position more than
the length of the command, the command's help was incorrectly started
on the new line.

(cherry picked from commit 7ee9921)

Co-authored-by: Savannah Ostrowski <[email protected]>
Co-authored-by: Pavel Ditenbir <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Sep 23, 2024

GH-124373 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Sep 23, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 23, 2024
…124230)

In case of usage a long command along with max_help_position more than
the length of the command, the command's help was incorrectly started
on the new line.

(cherry picked from commit 7ee9921)

Co-authored-by: Savannah Ostrowski <[email protected]>
Co-authored-by: Pavel Ditenbir <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Sep 23, 2024

GH-124374 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 bug and security fixes label Sep 23, 2024
serhiy-storchaka pushed a commit that referenced this pull request Sep 23, 2024
… (GH-124374)

In case of usage a long command along with max_help_position more than
the length of the command, the command's help was incorrectly started
on the new line.

(cherry picked from commit 7ee9921)

Co-authored-by: Savannah Ostrowski <[email protected]>
Co-authored-by: Pavel Ditenbir <[email protected]>
@savannahostrowski savannahostrowski deleted the gh-87041 branch September 27, 2024 16:49
Yhg1s pushed a commit that referenced this pull request Sep 30, 2024
… (#124373)

GH-87041: Fix incorrect indentation in argparse help (GH-124230)

In case of usage a long command along with max_help_position more than
the length of the command, the command's help was incorrectly started
on the new line.

(cherry picked from commit 7ee9921)

Co-authored-by: Savannah Ostrowski <[email protected]>
Co-authored-by: Pavel Ditenbir <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants