I am having trouble with pre-commit and black.
Everything worked fine until I cleared the cache with pre-commit clean
. Now I always get the error
The hook
black
requires pre-commit version 2.9.2 but version 2.6.0 is installed. Perhaps run `pip install --upgrade pre-commit
If I check my version I am running the latest pre-commmit version (v2.12.1). Also, if I run the recommended command, nothing changes and I get the same error. If I deactivate the black
hook the error disappears, so I at least know it's a problem with black.
I tried changing version of black from stable
to the most recent, but nothing helps.
Any ideas how I can do to troubleshoot this?
My pre-commit config:
- repo: https://github.com/ambv/black
rev: stable
hooks:
- id: black
language_version: python3.8
exclude: |
(?x)(
migrations/|
config/|
_build/|
buck-out/|
build/|
dist/
)
Help is greatly appreciated
3.8
? – Lindstrom