After flake8 has released version 4.0.0, it is no longer possible to install flakehell as a pre-commit hook. An example `.pre-commit-config.yaml`: ```yaml repos: - repo: https://github.com/flakehell/flakehell rev: v.0.8.0 hooks: - id: flakehell ``` will install flake8==4.0.0 and immediately fail. See #18 . Specifying a specific version of flake8 does not work. E.g. ```yaml repos: - repo: https://github.com/flakehell/flakehell rev: v.0.8.0 hooks: - id: flakehell additional_dependencies: - flake8==3.9.0 ``` will fail with exactly the same error. I'm not sure if pre-commit is just ignoring the pinned version, or something else is going on. The error has crippled my CI/CD pipelines and the only fix I can think of is to switch back to flake8.
Activity
KPLauritzen commentedon Oct 11, 2021
Could be related to a bug in pip, regarding how depencies are resolved.
See discussion here pypa/pip#10568
and loose dependency specified here https://github.com/flakehell/flakehell/blob/master/pyproject.toml#L70
uSpike commentedon Oct 11, 2021
The workaround that I just deployed for our project:
poetry add --dev flakehell, then update.pre-commit-config.yaml:🍪 💚 Fix `flakehell` error: `flake8` `4.0.0` compatibility issues
🍪 💚 Fix `flakehell` error: `flake8` `4.0.0` compatibility issues
🍪 💚 Fix `flakehell` error: `flake8` `4.0.0` compatibility issues
🍪 💚 Fix `flakehell` error: `flake8` `4.0.0` compatibility issues
KPLauritzen commentedon Oct 12, 2021
I pinned the flake8 version inside flakehell, as in #20 and I'm using my own fork until this one is updated.
mario-bermonti commentedon Oct 14, 2021
This worked for me!
sgaynetdinov commentedon Jan 12, 2022
@mario-bermonti @KPLauritzen I am already studying the problem and the proposed PR
@mcarans please do not use this repository to promote another repository