Skip to content

Conversation

9001
Copy link
Contributor

@9001 9001 commented Oct 7, 2025

When calculating the --help indentation, strip colors before counting the action length.

@python-cla-bot
Copy link

python-cla-bot bot commented Oct 7, 2025

All commit authors signed the Contributor License Agreement.

CLA signed

@bedevere-app
Copy link

bedevere-app bot commented Oct 7, 2025

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@9001
Copy link
Contributor Author

9001 commented Oct 7, 2025

The argparse tests failed because the previous indentation amount is expected; should I go over the tests and adjust them accordingly?

When calculating the --help indentation,
strip colors before counting the action length
@9001 9001 force-pushed the argparse-indent-fix branch from 2ac39cb to f63fed7 Compare October 8, 2025 00:07
@savannahostrowski
Copy link
Member

@9001 Thanks for catching this. I was able to reproduce this, and it appears that those tests were introduced in #133941, following the change in spacing with #130645. So yeah, I think we can update the tests to reflect the correct spacing.

@hugovk hugovk added the needs backport to 3.14 bugs and security fixes label Oct 8, 2025
@9001
Copy link
Contributor Author

9001 commented Oct 8, 2025

Alright -- I believe the remaining test failure is unrelated. Please let me know if there is anything more to be done at this point :)

@hugovk
Copy link
Member

hugovk commented Oct 8, 2025

I restarted the failure and it passed 👍

Copy link
Member

@savannahostrowski savannahostrowski left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks so much!

@savannahostrowski savannahostrowski enabled auto-merge (squash) October 8, 2025 15:09
@savannahostrowski savannahostrowski merged commit 72e370c into python:main Oct 8, 2025
45 checks passed
@miss-islington-app
Copy link

Thanks @9001 for the PR, and @savannahostrowski for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 8, 2025
(cherry picked from commit 72e370c)

Co-authored-by: ed <s@ocv.me>
Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
@bedevere-app
Copy link

bedevere-app bot commented Oct 8, 2025

GH-139793 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label Oct 8, 2025
savannahostrowski added a commit that referenced this pull request Oct 8, 2025
…9793)

gh-139736: Fix argparse indentation overshoot (GH-139738)
(cherry picked from commit 72e370c)

Co-authored-by: ed <s@ocv.me>
Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
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.

3 participants