Skip to content

gh-92266: Replace tabs with four spaces in Python files #135983

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

Merged
merged 1 commit into from
Jun 27, 2025

Conversation

hugovk
Copy link
Member

@hugovk hugovk commented Jun 26, 2025

make patchcheck used to be part of the CI, and it also used to run Tools/patchcheck/reindent.py.

reindent.py includes a few lints:

  • strip trailing whitespace (now done by trailing-whitespace in CI via pre-commit)
  • replace tabs with spaces
  • reindent to multiples of four-space indents

This PR re-adds the second of these to the CI via pre-commit.

(The second and third of these can be done by Black and Ruff, but they also do all the other formatting changes which we've not agreed upon yet.)

@hugovk hugovk merged commit de0d014 into python:main Jun 27, 2025
36 checks passed
@hugovk hugovk deleted the 3.15-pre-commit-remove-tabs branch June 27, 2025 13:23
@miss-islington-app
Copy link

Thanks @hugovk for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 27, 2025
…GH-135983)

(cherry picked from commit de0d014815667982c683adb2b2cc16ae2bfb3c82)

Co-authored-by: Hugo van Kemenade <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 27, 2025
@bedevere-app
Copy link

bedevere-app bot commented Jun 27, 2025

GH-136035 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 Jun 27, 2025
@bedevere-app
Copy link

bedevere-app bot commented Jun 27, 2025

GH-136036 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 Jun 27, 2025
hugovk added a commit that referenced this pull request Jun 27, 2025
hugovk added a commit that referenced this pull request Jun 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants