flake8-colors 0.1.8 breaks yesqa with pre-commit somehow
See original GitHub issueYesterday after you helped me with #50 everything was fine and my GH Action passed.
Today I made a commit which removed comments, updated an env-description and added a skip_install=true
to another env in my tox.ini
. So nothing to do with my flake8 or pre-commit setup. But the GH Action suddenly failed. I looked in the logs and yesqa
- who knows why - removed multiple noqa
s which it did not yesterday and flake8
failed because of the missing noqa
s.
I looked into it and locally it also failed. I compared the dependencies which tox
installed in the two CI runs and the only difference was flake8-colors
which went from 0.1.6
in the successful run to 0.1.8
in the crashing one. After trying it locally flake8-colors
0.1.8
does yesqa
no good. The only change worth mentioning they made is this merge. And I don’t get it why yesqa
works with flake8-colors
0.1.6
but not with flake8-colors
0.1.8
😖
Whats more confusing is, that if I run yesqa
manually and not via pre-commit
(does not matter if via local hook, how I run it, or the “correct” way with additional_dependencies
set - tested both) it succeeds.
Reproduction
I narrowed it down to this setup (which I actually tested on a windows PC, but the CI runs linux):
testfile.py
:
"""
python_test-cielquan
~~~~~~~~~~~~~~~~~~~~
Test repo for python stuff
:copyright: (c) Christian Riedel
:license: MIT, see LICENSE for more details
""" # noqa: D205, D208, D400
For local yesqa
tests run:
$ python3.8 -m venv venv
$ . venv/bin/activate
$ pip install yesqa==1.2.2 flake8==3.8.4
$ yesqa testfile.py
See that yesqa works and removes noqa, if flake8-docstrings
is not installed
Add the noqa
back to the file and continue with:
$ pip install flake8-colors==0.1.6 flake8-docstrings==1.5.0 pydocstyle==5.1.1
$ yesqa testfile.py
$ pip install flake8-colors==0.1.8
$ yesqa testfile.py
See that yesqa
does not remove the noqa
with falke8-colors
0.1.6
or 0.1.8
.pre-commit-config.yaml
repos:
- repo: https://github.com/asottile/yesqa
rev: v1.2.2
hooks:
- id: yesqa
name: yesqa - flake8-colors==0.1.6
additional_dependencies:
- "flake8==3.8.4"
- "flake8-colors==0.1.6"
- "flake8-docstrings==1.5.0"
- "pydocstyle==5.1.1"
files: 'testfile\.py'
- id: yesqa
name: yesqa - flake8-colors==0.1.8
additional_dependencies:
- "flake8==3.8.4"
- "flake8-colors==0.1.8"
- "flake8-docstrings==1.5.0"
- "pydocstyle==5.1.1"
files: 'testfile\.py'
For pre-commit
tests run:
$ python3.8 -m venv venv
$ . venv/bin/activate
$ pip install pre-commit==2.8.2
$ pre-commit run yesqa --all-files -v
See that the latter hook fails.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
https://github.com/and3rson/flake8-colors/issues/12
ok I can reproduce it now, it’s this line here which breaks passed
--format
: