Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pre-commit flake8 saying passed when flake8 fails #147

Closed
rosesyrett opened this issue Aug 18, 2023 · 1 comment
Closed

pre-commit flake8 saying passed when flake8 fails #147

rosesyrett opened this issue Aug 18, 2023 · 1 comment

Comments

@rosesyrett
Copy link
Contributor

rosesyrett commented Aug 18, 2023

I recently checked out #143 to review it, and noticed a flake8 error in my IDE. Upon running flake8, I noticed two E721 errors. In the pre-commit-config.yaml, this error is not being ignored, yet it does not show up when running pre-commit:

(venv) root ➜ .../rose/Documents/projects/dodal (129_edge_detection) $ pre-commit run --all
[INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Initializing environment for https://github.com/psf/black.
[INFO] Initializing environment for https://github.com/pycqa/isort.
[INFO] Initializing environment for https://github.com/pycqa/flake8.
[INFO] Initializing environment for https://github.com/pycqa/flake8:flake8-comprehensions==3.8.0,Flake8-pyproject.
[INFO] Initializing environment for https://github.com/pre-commit/mirrors-mypy.
[INFO] Initializing environment for https://github.com/pre-commit/mirrors-mypy:types-requests,pydantic.
[INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/psf/black.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/pycqa/isort.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/pycqa/flake8.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/pre-commit/mirrors-mypy.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
check for added large files..............................................Passed
check yaml...............................................................Passed
check for merge conflicts................................................Passed
black....................................................................Passed
isort (python)...........................................................Passed
flake8...................................................................Passed
mypy.....................................................................Passed
(venv) root ➜ .../rose/Documents/projects/dodal (129_edge_detection) $ flake8 src/
src/dodal/beamlines/beamline_utils.py:42:12: E721 do not compare types, for exact checks use `is` / `is not`, for instance checks use `isinstance()`
src/dodal/devices/status.py:24:8: E721 do not compare types, for exact checks use `is` / `is not`, for instance checks use `isinstance()`
@dperl-dls
Copy link
Collaborator

Closing because we're not using flake8 anymore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants