pylint-pytest
A Pylint plugin to suppress pytest-related false positives.
What it is and what it does
pylint-pytest is a Pylint plugin designed to make static analysis work better with pytest test code. It solves the problem of Pylint raising false-positive warnings when analyzing pytest fixtures and test functions—for example, flagging fixture parameters as unused arguments even though pytest injects them at runtime. The plugin suppresses four common false positives (unused-argument, unused-import, redefined-outer-name, and no-member) that occur when fixtures are properly used but not referenced in the function body.
Beyond suppression, the plugin also raises four new warnings to catch deprecated or problematic pytest patterns: deprecated-pytest-yield-fixture (for the old @pytest.yield_fixture decorator), useless-pytest-mark-decorator (for @pytest.mark.* on fixtures where it has no effect), deprecated-positional-argument-for-pytest-fixture (for positional arguments to @pytest.fixture), and cannot-enumerate-pytest-fixtures (when the plugin cannot analyze fixtures in a test module). It requires pylint and pytest>=4.6 and is enabled by loading it as a Pylint plugin.
Use it for:
- Suppress false positives in CI/CD pipelines that run Pylint on pytest test suites to maintain a clean lint report.
- Catch deprecated pytest patterns like @pytest.yield_fixture before they cause issues in newer pytest versions.
- Analyze fixture-heavy test code without having to disable Pylint rules or add noqa comments throughout.
- Enforce consistent pytest fixture patterns by raising warnings on useless decorators or positional arguments.
- Integrate code quality checks into test modules without fighting Pylint's static analysis limitations.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A Pylint plugin that suppresses false-positive warnings when analyzing pytest test code, and raises new warnings for deprecated or problematic pytest patterns.
Yes. This is a low-friction, actively maintained plugin that solves a real problem: Pylint's inability to understand pytest's fixture injection model. If you run Pylint on pytest test code, this plugin will eliminate noise and catch genuine pytest anti-patterns. No security issues, permissive license, and production-stable.
Install
pylint-pytest on PyPI
pip
pip install pylint-pytestuv
uv add pylint-pytestpoetry
poetry add pylint-pytestInstalling pylint-pytest
Before you install
Low friction install with just two runtime dependencies (pylint and pytest). Actively maintained with a recent commit in 2026 and marked as production-stable.
License in practice
MIT license is permissive; you can use this in commercial and proprietary projects with minimal restrictions.
Quickstart
pip install pylint-pytest
# In .pylintrc:
# [MASTER]
# load-plugins=pylint_pytest
# Or via command line:
# pylint --load-plugins pylint_pytest <path_to_sources>
Verify before relying
- Whether the plugin correctly handles all pytest fixture patterns in real-world test suites
- Performance impact when analyzing large test codebases with many fixtures
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.6) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — pylint, pytest |
| Maintenance | actively maintained — 813 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 600,624/month — #5,820 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pylint_pytest-1.1.8-py3-none-any.whl
Keywords: pylint, pytest, plugin
Tags
More Testing packages
Pluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
virtualenvvirtualenv creates isolated Python environments…
permissive · top 100 on PyPI
coverageCoverage.py measures which lines of Python code…
permissive · top 1,000 on PyPI
pytest-asynciopytest-asyncio is a pytest plugin that enables…
permissive · top 1,000 on PyPI
pytest-json-ctrfA pytest plugin that generates test reports in…
permissive · top 1,000 on PyPI
pylint-djangoA Pylint plugin that improves static analysis…
copyleft · top 5,000 on PyPI
pylint-flask-sqlalchemyA Pylint plugin that suppresses false-positive…
copyleft · top 15,000 on PyPI
pylint-per-file-ignoresA pylint plugin that lets you specify which…
permissive · top 15,000 on PyPI
pylint-odooA Pylint plugin that adds Odoo-specific code…
agpl · top 15,000 on PyPI
pylint-pydanticA Pylint plugin that extends Pylint's…
copyleft · top 5,000 on PyPI
pylint-celeryA Pylint plugin that improves static analysis…
copyleft · top 15,000 on PyPI
pytest-unused-fixturesA pytest plugin that identifies and reports…
permissive · top 15,000 on PyPI
pytest-pylintIntegrates pylint code analysis into pytest,…
permissive · top 15,000 on PyPI
flake8-pytest-styleA flake8 plugin that detects and reports style…
unclear · top 15,000 on PyPI
pylint-flaskA Pylint plugin that resolves Flask extension…
copyleft · top 15,000 on PyPI