gh-110652: Fix pre-commit hooks on macOS#110653
Conversation
|
This approach doesn't work on Windows, unfortunately, I don't think. I think I'd prefer using a |
Sorry, something went wrong.
hugovk
left a comment
There was a problem hiding this comment.
Does this work on Windows?
Sorry, something went wrong.
no: |
Sorry, something went wrong.
|
It isn't well documented, but I had hoped This is, I think, as the shebang line says A |
Sorry, something went wrong.
|
With: name: "Check Python file whitespace"
entry: 'Tools/patchcheck/reindent.py --nobackup --newline LF'And: #! /usr/bin/env pythonOn macOS I get: |
Sorry, something went wrong.
|
@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 |
Sorry, something went wrong.
Argh, that's still a no :(( Details |
Sorry, something went wrong.
|
Sounds like it's a pre-commit bug; their docs says it should work on Windows: https://pre-commit.com/#python |
Sorry, something went wrong.
The docs also say this, however, which isn't what we're doing:
I'm guessing this is the issue here -- the |
Sorry, something went wrong.
|
Then let's make those scripts pip installable. |
Sorry, something went wrong.
|
Closing; see issue. |
Sorry, something went wrong.
edited by bedevere-app
Bot
LoadingUh oh!
There was an error while loading. Please reload this page.
Copy link Copy MarkdownSorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.