JelleZijlstra / autotyping

Automatically add simple type annotations to your code
238 stars 20 forks source link

Pre-commit setup doesn't work #79

Open gardiens opened 1 month ago

gardiens commented 1 month ago

Hello, when I write my .pre-commit-config.yaml as stated in the readme :

repos:
  - repo: https://github.com/JelleZijlstra/autotyping
    rev:  v24.4.0
    hooks:
      - id: autotyping
        stages: [commit]
        types: [python]
        args: [--safe] # or alternatively, --aggressive, or any of the other flags mentioned above 

When I run pre-commit I got this error :

[INFO] Initializing environment for https://github.com/JelleZijlstra/autotyping.
An unexpected error has occurred: CalledProcessError: command: ('C:\\Program Files\\Git\\mingw64\\bin\\git.EXE', 'checkout', 'v24.4.0')
return code: 1
stdout: (none)
stderr:
    error: pathspec 'v24.4.0' did not match any file(s) known to git

Do you have any idea why this error happens? I know pre-commit wasn't supposed to be natively supported :(