-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
gh-110652: Fix pre-commit hooks on macOS #110653
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
Conversation
This approach doesn't work on Windows, unfortunately, I don't think. I think I'd prefer using a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this work on Windows?
no:
|
It isn't well documented, but I had hoped
This is, I think, as the shebang line says A |
With: name: "Check Python file whitespace"
entry: 'Tools/patchcheck/reindent.py --nobackup --newline LF' And: #! /usr/bin/env python On macOS I get:
|
@AA-Turner, in #109891 (comment) you commented that using a Python-language hook (rather than a system-language hook, as we have currently) might slow us down unnecessarily, as pre-commit would have to create a venv before the hook would run. But in my experience, the Python-language hooks in the |
@AlexWaygood, does 9501fab work on Windows? |
Argh, that's still a no :((
|
Sounds like it's a pre-commit bug; their docs says it should work on Windows: https://pre-commit.com/#python |
The docs also say this, however, which isn't what we're doing:
I'm guessing this is the issue here -- the |
Then let's make those scripts pip installable. |
Closing; see issue. |
Uh oh!
There was an error while loading. Please reload this page.