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-109408: Revert pre-commit whitespace checks pending portable solution #110726

Merged
merged 2 commits into from
Oct 11, 2023

Conversation

hugovk
Copy link
Member

@hugovk hugovk commented Oct 11, 2023

Re: #110652, revert PRs #109890 and #109891 because we didn't find a portable solution that works on both macOS and Windows.

I kept a couple of the string formatting (and whitespace) improvements:

-    return "{} file{}".format(count, "s" if count != 1 else "")
+    s = "s" if count != 1 else ""
+    return f"{count} file{s}"
-    cmd = "git remote show {}".format(remote_name).split()
+    cmd = f"git remote show {remote_name}".split()

(I suggest finding existing pre-commit checks that can do more-or-less the same thing as the patchcheck things. They don't necessarily need to be exactly the same.)

@hugovk hugovk added the needs backport to 3.12 bug and security fixes label Oct 11, 2023
@hugovk
Copy link
Member Author

hugovk commented Oct 11, 2023

Note: I kept the changes to untabify.py because they look good.

Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

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

LGTM. N.B. #109890 made some changes to Tools/patchcheck/untabify.py that haven't been reverted here, but I think they're good changes that we should keep, anyway :)

@AlexWaygood AlexWaygood enabled auto-merge (squash) October 11, 2023 15:55
@AlexWaygood AlexWaygood merged commit de956b2 into python:main Oct 11, 2023
24 of 25 checks passed
@miss-islington
Copy link
Contributor

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 11, 2023
… solution (pythonGH-110726)

(cherry picked from commit de956b2)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
@bedevere-app
Copy link

bedevere-app bot commented Oct 11, 2023

GH-110730 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 Oct 11, 2023
@AlexWaygood
Copy link
Member

@erlend-aasland FYI!

@hugovk hugovk deleted the revert-patchcheck/file-whitespace branch October 11, 2023 16:20
AlexWaygood pushed a commit that referenced this pull request Oct 11, 2023
…e solution (GH-110726) (#110730)

gh-109408: Revert pre-commit whitespace checks pending portable solution (GH-110726)
(cherry picked from commit de956b2)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
@erlend-aasland
Copy link
Contributor

Thanks!

Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
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.

4 participants