FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-109408: Revert pre-commit whitespace checks pending portable solution by hugovk · Pull Request #110726 · python/cpython · GitHub

/ cpython Public

gh-109408: Revert pre-commit whitespace checks pending portable solution - #110726

Merged
AlexWaygood merged 2 commits into
python:mainfrom
hugovk:revert-patchcheck/file-whitespace
Oct 11, 2023
Merged

gh-109408: Revert pre-commit whitespace checks pending portable solution#110726
AlexWaygood merged 2 commits into
python:mainfrom
hugovk:revert-patchcheck/file-whitespace

Conversation

hugovk commented Oct 11, 2023
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Member

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 added the needs backport to 3.12 only security fixes label Oct 11, 2023

hugovk commented Oct 11, 2023

Copy link
Copy Markdown
Member Author

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

AlexWaygood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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 enabled auto-merge (squash) October 11, 2023 15:55
AlexWaygood merged commit de956b2 into python:main Oct 11, 2023

Copy link
Copy Markdown
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 Bot commented Oct 11, 2023

Copy link
Copy Markdown

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

bedevere-app Bot removed the needs backport to 3.12 only security fixes label Oct 11, 2023

Copy link
Copy Markdown
Member

@erlend-aasland FYI!

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>

Copy link
Copy Markdown
Contributor

Thanks!

Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL