You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We use flake8-comprehensions as part of the CI process when linting code, and it's included in our environment.yml file, but it's not run as part of pre-commit.
For a simple example, add the following line of code to a file in the codebase:
sum([x+1forxinrange(3)])
Then in the command line run:
git add .
pre-commit run flake8
And the pre-commit check passes.
However, running flake8 from the command line (like what is done in CI) fails due to the flake8-comprehensions plugin being included:
flake8 path/to/changed/file.py
Gives me the error:
C407 Unnecessary list comprehension - 'sum' can take a generator.
The text was updated successfully, but these errors were encountered:
We use
flake8-comprehensions
as part of the CI process when linting code, and it's included in ourenvironment.yml
file, but it's not run as part ofpre-commit
.For a simple example, add the following line of code to a file in the codebase:
Then in the command line run:
git add . pre-commit run flake8
And the
pre-commit
check passes.However, running
flake8
from the command line (like what is done in CI) fails due to theflake8-comprehensions
plugin being included:Gives me the error:
C407 Unnecessary list comprehension - 'sum' can take a generator.
The text was updated successfully, but these errors were encountered: