Yeah, my steps were basically: ```$ pyenv install...
# contributing
d
Yeah, my steps were basically:
Copy code
$ pyenv install <version>
$ pyenv local <version>
$ pip install --upgrade pip
$ pip install poetry
$ poetry install
$ poetry run pre-commit install --install-hooks
$ git commit
a
Okay, thanks for confirming. Pinging @douwe_maan for input tomorrow during his working hours.
d
I haven’t been able to fix it, but I think I might see the cause. The line in
flake8
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`:
Copy code
$ 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?
I got it fixed, I’ll submit a MR once I figure out what’s required there https://gitlab.com/deanmorin/meltano/-/tree/contributor-fixes
a
@dean_morin - Thanks very much. I’ve started reviewing. On the surface, it looks like you’ve submitted everything needed. I want to dig in a little more to (1) understand the root cause a bit better and (2) make a call with @douwe_maan on whether to have flakehell pin to the specific flake8 version, versus allowing minor upgrades as is the case today.