```console $ grep "entry.*python" .pre-commit-config.yaml entry: 'python Tools/patchcheck/reindent.py --nobackup --newline LF' entry: "python Tools/patchcheck/untabify.py" ``` Unfortunately, there is no `python` on macOS; only `python3`. Can we change these to `python3`? <!-- gh-linked-prs --> ### Linked PRs * gh-110653 <!-- /gh-linked-prs -->
Activity
erlend-aasland commentedon Oct 10, 2023
Simply executing these scripts directly would also do:
pythongh-110652: Fix pre-commit hooks on macOS
hugovk commentedon Oct 10, 2023
Yep, see also comments at #109891 (comment).
We can't use
python3because that won't work on Windows...Let's check if direct execution works on Windows.
AlexWaygood commentedon Oct 10, 2023
Unfortunately neither approach works on Windows: see #110653 (comment) ://
AlexWaygood commentedon Oct 11, 2023
I think we should revert these commits until we figure out how to fix this properly (if it can be "fixed properly"):
hugovk commentedon Oct 11, 2023
Agree to revert.
I'd prefer to replace
Tools/patchcheck/reindent.pyandTools/patchcheck/untabify.pywith other pre-commit hooks.erlend-aasland commentedon Oct 11, 2023
Surely there must be existing hooks we can use.
If we need CPython specific hooks, we can create a repo for them under the GitHub
pythonorg. (for examplepython/pre-commit)