dean_morin
06/02/2021, 12:40 AM$ pyenv install <version>
$ pyenv local <version>
$ pip install --upgrade pip
$ pip install poetry
$ poetry install
$ poetry run pre-commit install --install-hooks
$ git commitaaronsteers
06/02/2021, 12:41 AMdean_morin
06/02/2021, 4:33 AMflake8 throwing the exception was introduced in 3.81 .
The version of flake8 run by pre-commit, is not necessarily the same version in poetry.lock. It’s instead set in the `flakehell` `pyfroject.toml` to be `= 3.80`>. And I don’t see any lock file in the repo to keep it at a specific version.
On my machine, pre-commit is using `3.9.2`:
$ ls ~/.cache/pre-commit/repodr01fcsk/py_env-python3.8/lib/python3.8/site-packages/ | grep flake8
flake8
flake8-3.9.2.dist-info
Is it possible that on your machine pre-commit is using <= 3.9.0 instead?
If you deleted ~/.cache and ran poetry run pre-commit install --install-hooks again then tried to commit, do you get the same issue as me?dean_morin
06/02/2021, 5:39 AMdean_morin
06/02/2021, 4:00 PMaaronsteers
06/02/2021, 5:15 PM