Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
AlexWaygood commented Oct 10, 2023 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
This approach doesn't work on Windows, unfortunately, I don't think. I think I'd prefer using a |
hugovk left a comment
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?
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
AlexWaygood commented Oct 10, 2023
no: |
AA-Turner commented Oct 10, 2023
It isn't well documented, but I had hoped This is, I think, as the shebang line says A |
hugovk commented Oct 11, 2023
With: name: "Check Python file whitespace"entry: 'Tools/patchcheck/reindent.py --nobackup --newline LF'And: #! /usr/bin/env pythonOn macOS I get: |
AlexWaygood commented Oct 11, 2023 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
@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 |
erlend-aasland commented Oct 11, 2023
@AlexWaygood, does 9501fab work on Windows? |
AlexWaygood commented Oct 11, 2023
Argh, that's still a no :(( Details |
erlend-aasland commented Oct 11, 2023
Sounds like it's a pre-commit bug; their docs says it should work on Windows: https://pre-commit.com/#python |
AlexWaygood commented Oct 11, 2023
The docs also say this, however, which isn't what we're doing:
I'm guessing this is the issue here -- the |
erlend-aasland commented Oct 11, 2023
Then let's make those scripts pip installable. |
erlend-aasland commented Oct 11, 2023
Closing; see issue. |
Uh oh!
There was an error while loading. Please reload this page.