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

Replace pytest-flake8 with a pre-commit hook #82

Closed
miketheman opened this issue Nov 11, 2021 · 0 comments · Fixed by #91
Closed

Replace pytest-flake8 with a pre-commit hook #82

miketheman opened this issue Nov 11, 2021 · 0 comments · Fixed by #91
Labels
enhancement New feature or request

Comments

@miketheman
Copy link
Owner

At some point, pytest and flake8 stopped working well together. See tholo/pytest-flake8#81 and related links.

This may get worse with pytest 7

On this thread, see a comment around running flake8 as part of pytest is considered an anti pattern.

I think that the more tooling we try to bake into a given pytest run, the harder it is to split them apart, so instead, let's adopt the pre-commit framework for executing any stylistic checks we want prior to a commit - flake8, black, isort, and anything else we want, like editorconfig...

This check would need to also run on CI so that if an author doesn't run it locally, it'll catch anything missing.

@miketheman miketheman added the enhancement New feature or request label Nov 11, 2021
miketheman added a commit that referenced this issue Dec 21, 2021
There's weird behaviors with Flake8 interacting with pytest.

Instead of using pytest to run the tests, make it a pre-commit hook.

Resolves #82

Signed-off-by: Mike Fiedler <miketheman@gmail.com>
miketheman added a commit that referenced this issue Dec 21, 2021
There's weird behaviors with Flake8 interacting with pytest.

Instead of using pytest to run the tests, make it a pre-commit hook.

Resolves #82

Signed-off-by: Mike Fiedler <miketheman@gmail.com>
DevL added a commit to funnel-io/python-on-rails that referenced this issue Feb 11, 2022
pytest-flake8 seems abandoned at this point

Related issues in other repositories:
* tholo/pytest-flake8#83
* miketheman/pytest-socket#82
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant