Using the commit hooks on Windows #12045
-
I have been struggling to get the commit hooks to work on Windows
if I test the pre-commit hooks with: then the output is :
Clearly Proper ways to specify a manor/minor version are : Running codeformat.py directly works fine:
Shebang lines are also supported: https://docs.python.org/3.11/using/windows.html#shebang-lines So I'm in the dark of how this is supposed to work ( and yes, it works well in *nix , WSL ,containers and in codespaces, so there are work-arounds aplenty) So : Has anyone gotten this to work on Windows? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
That should also be
Don't have time to try this now, but: I think that would mean that pre-commit is using the launcher |
Beta Was this translation helpful? Give feedback.
-
After re-install python yet again - but now not form the store - i ran into this issue again Documenting the steps to to create the Run in a Elevated powershell prompt. # adjust the path for your version of python
cd $env:userprofile\AppData\Local\Programs\Python\Python311
new-item python3.exe -itemtype SymbolicLink -Value python.exe |
Beta Was this translation helpful? Give feedback.
did some rip and rebuild to figure this out:
I must have created this in an earlier attempt to get this to work. Flash is not the only memory that can degrade apparently. (that was also why python appeared to accept the -V:3 , that was actually py.exe'
Then :
Install python 3.11 from the Windows store
checked Windows Application Aliases ( in Settings) , and found that t…