--- id: pytest-flake8 version: "1.3.0" license: unclear license_treatment: permissive maintenance: active --- # pytest-flake8 — pytest plugin to check FLAKE8 requirements License: permissive · Maintenance: active · Downloads: 506.3K/mo ## What it is and what it does pytest-flake8 is a pytest plugin that integrates PEP8 style checking directly into your test suite. When you run pytest with the --flake8 flag, it automatically discovers all .py files in your project and checks them against flake8 rules, reporting style violations as test failures. This lets you enforce code quality standards alongside your functional tests. The plugin caches results and only re-checks modified files by default, which speeds up repeated test runs. You can configure which errors or warnings to ignore on a per-project or per-file basis using standard flake8 configuration. If you have flake8 plugins installed, they are automatically applied without additional setup. Use it for: - Enforce PEP8 compliance in CI/CD pipelines by failing builds when style violations are detected - Run code quality checks alongside unit tests to catch style issues early in development - Configure project-specific or file-specific style rules using flake8's standard configuration - Integrate linting into existing pytest workflows without adding separate tool invocations ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. A pytest plugin that runs flake8 PEP8 compliance checks on Python files as part of your test suite, discovering and checking every .py file automatically. Yes. Low friction to install, actively maintained, no known vulnerabilities, and permissive licensing. Use it if you want PEP8 compliance checks as part of your pytest suite and prefer integrated tooling over separate linting steps. ## Install pip install pytest-flake8 uv add pytest-flake8 poetry add pytest-flake8 ## Installing pytest-flake8 Before you install: Low install friction with only two runtime dependencies (flake8 and pytest). Actively maintained as of April 2026, with stable production status since its initial release. License in practice: Licensed under MIT (permissive), so you can use and modify it freely in commercial or private projects with minimal restrictions. Quickstart: pip install pytest-flake8 pytest --flake8 Requires Python 3.9 or later; flake8 and pytest must be installed in your test environment. Verify before relying: - Whether optional flake8 plugins are auto-detected and applied without manual configuration - How caching behavior interacts with CI/CD pipelines and whether cache-clear is needed regularly ## Package facts - License: not declared (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 506.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags pytest flake8 plugin, pep8 compliance testing, code style checking pytest, flake8 test integration, python linting in tests, automated code quality checks, linting, code-quality, pytest-plugin [View on SkillFed](https://skillfed.io/packages/pytest-flake8) · [View on PyPI](https://pypi.org/project/pytest-flake8/)