pylint-pytest is a Pylint plugin designed to suppress common false positives that arise when Pylint analyzes code written for Pytest, such as `unused-argument` for fixtures. The current version is 1.1.8, with active development including a v2.0.0 alpha series indicating ongoing significant updates and a regular release cadence.
pip install pylint-pytestVerified import paths — ran on the pinned version, not inferred.
Install the plugin, then invoke Pylint using the `--load-plugins` option or configure it in your Pylint configuration file (e.g., `pyproject.toml` or `.pylintrc`) to enable the plugin. This prevents false positives related to pytest fixtures and test functions.
Upgrade Pylint to version 3.x or higher: `pip install 'pylint>=3.0.0'`.
Pin your `pytest` version to `<=8.2.0` if you encounter issues with `pylint-pytest==1.1.8` (e.g., `pip install 'pytest<=8.2.0'`). Consult the `pylint-pytest` changelog for updates on this compatibility.
Ensure your project uses Python 3.10 or newer when upgrading to `pylint-pytest` v2.x.
Refactor your fixtures to use `pytest.fixture` with a `yield` statement directly, as `pytest.yield_fixture` has been deprecated.