Skip to content

Conversation

@9001
Copy link
Contributor

@90019001 commented Oct 7, 2025

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

@python-cla-bot
Copy link

python-cla-botbot commented Oct 7, 2025

All commit authors signed the Contributor License Agreement.

CLA signed

@bedevere-app
Copy link

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
ContributorAuthor

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
@90019001force-pushed the argparse-indent-fix branch from 2ac39cb to f63fed7CompareOctober 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.

@hugovkhugovk added the needs backport to 3.14 bugs and security fixes label Oct 8, 2025
@9001
Copy link
ContributorAuthor

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

I restarted the failure and it passed 👍

Copy link
Member

@savannahostrowskisavannahostrowski 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!

@savannahostrowskisavannahostrowski enabled auto-merge (squash) October 8, 2025 15:09
@savannahostrowskisavannahostrowski merged commit 72e370c into python:mainOct 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 <[email protected]> Co-authored-by: Savannah Ostrowski <[email protected]>
@bedevere-app
Copy link

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

@bedevere-appbedevere-appbot 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 <[email protected]> Co-authored-by: Savannah Ostrowski <[email protected]>
Sign up for freeto 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

@9001@savannahostrowski@hugovk