Skip to content

coherent-oss/pytest-flake8

 
 

Repository files navigation

tests Ruff https://readthedocs.org/projects/pytest-flake8/badge/?version=latest https://img.shields.io/badge/skeleton-2024-informational

pytest plugin for efficiently checking PEP8 compliance

Usage

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.

Configuring Flake8

See the Flake8 docs on configuring.

FAQs

All the Flake8 tests are skipping!

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.

Notes

For more info on pytest see http://pytest.org

The code is partially based on Ronny Pfannschmidt's pytest-codecheckers plugin.

About

pytest plugin to run flake8

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%