Install it into a test environment, then run tests with the option.
pytest --flake8
Every file ending in .py
will be discovered and checked with
flake8.
Note
If optional flake8 plugins are installed, those will be used automatically. No provisions have been made for configuring these via pytest.
Warning
Running flake8 tests on your project is likely to cause a number of issues. The plugin allows one to configure on a per-project and per-file basis which errors or warnings to ignore, see flake8-ignore.
See the Flake8 docs on configuring.
By design, results are cached and only changed files are checked.
To bypass this caching mechanism, run the following command:
pytest --cache-clear --flake8
Run tests with [tox](https://tox.wiki) (e.g. pipx run tox).
For more information, take a look at the skeleton.
For more info on pytest see http://pytest.org
The code is partially based on Ronny Pfannschmidt's pytest-codecheckers plugin.