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

Avoid using pytest-flake8, run flake8 separately instead #599

Closed
osma opened this issue Aug 2, 2022 · 1 comment · Fixed by #650
Closed

Avoid using pytest-flake8, run flake8 separately instead #599

osma opened this issue Aug 2, 2022 · 1 comment · Fixed by #650
Assignees
Milestone

Comments

@osma
Copy link
Member

osma commented Aug 2, 2022

We are currently using pytest-flake8, which runs flake8 code style checks within pytest. But it has turned out to be fragile (see PR #598 and tholo/pytest-flake8#87) and many projects are switching to a setup where flake8 is run separately (see pypa/pyproject-hooks#147 , pytest-dev/pytest#9217 (comment), miketheman/pytest-socket#82 )

We should also consider doing this. At the moment it is not possible to use the recently released flake8 version 5 because it's not compatible with pytest-flake8 1.1.1, so we have for now pinned flake8 to version 4 in #598, but this is not a good long term solution.

@osma osma added this to the Long term milestone Aug 2, 2022
@juhoinkinen juhoinkinen self-assigned this Nov 24, 2022
@juhoinkinen
Copy link
Member

juhoinkinen commented Nov 24, 2022

Now (since #640 and #641) we have a CI/CD job for Black and isort lint checks, so the flake8 check could be easily added to that job.

The instruction for the precommit hook already includes flake8, so running flake8 within pytest is redundant, and pytest-flake8 plugin can be just removed and flake8 upgraded to latest version.

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

Successfully merging a pull request may close this issue.

2 participants