{"id":6057,"library":"pylint-pytest","title":"Pylint Pytest Plugin","description":"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.","status":"active","version":"1.1.8","language":"python","source_language":"en","source_url":"https://github.com/pylint-dev/pylint-pytest","tags":["pylint","pytest","linter","testing","plugin","static analysis"],"install":[{"cmd":"pip install pylint-pytest","lang":"bash","label":"Install stable version"}],"dependencies":[{"reason":"Core linter; pylint-pytest v1.1.7+ requires Pylint v3 or newer.","package":"pylint","optional":false},{"reason":"Testing framework; pylint-pytest v1.1.8 has known compatibility issues with pytest versions greater than 8.2.0.","package":"pytest","optional":false}],"imports":[{"note":"Pylint plugins are loaded via command-line flags or configuration files (e.g., .pylintrc, pyproject.toml), not directly imported in Python source code.","wrong":"import pylint_pytest # (in Python code)","symbol":"pylint_pytest","correct":"pylint --load-plugins pylint_pytest your_module.py"}],"quickstart":{"code":"import pytest\n\ndef my_fixture():\n    return 42\n\ndef test_example(my_fixture):\n    \"\"\"This test uses a fixture, which Pylint might incorrectly flag as unused.\"\"\"\n    assert my_fixture == 42\n\n# To run pylint with the plugin:\n# Save the above as `test_module.py`\n# Then run: pylint --load-plugins pylint_pytest test_module.py","lang":"python","description":"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."},"warnings":[{"fix":"Upgrade Pylint to version 3.x or higher: `pip install 'pylint>=3.0.0'`.","message":"Versions 1.1.7 and later of `pylint-pytest` require Pylint v3 or newer due to backward-incompatible changes in Pylint's API. Users on older Pylint versions must upgrade Pylint or stick to `pylint-pytest < 1.1.7`.","severity":"breaking","affected_versions":">=1.1.7"},{"fix":"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.","message":"Version 1.1.8 of `pylint-pytest` has a known compatibility issue with `pytest` versions greater than `8.2.0` that can cause errors during linting.","severity":"gotcha","affected_versions":"1.1.8"},{"fix":"Ensure your project uses Python 3.10 or newer when upgrading to `pylint-pytest` v2.x.","message":"Alpha versions for `pylint-pytest` 2.0.0 (e.g., v2.0.0a1) have dropped support for Python 3.8 and 3.9, aligning with broader dependency deprecations.","severity":"breaking","affected_versions":">=2.0.0a0"},{"fix":"Refactor your fixtures to use `pytest.fixture` with a `yield` statement directly, as `pytest.yield_fixture` has been deprecated.","message":"The `pylint-pytest` plugin will raise a `W6401 deprecated-pytest-yield-fixture` warning if you use the `@pytest.yield_fixture` decorator, which is deprecated in Pytest.","severity":"deprecated","affected_versions":"*"}],"env_vars":null,"search_vec":"'1.1.8':37 'activ':39 'alpha':44 'analysi':61 'analyz':21 'argument':30 'aris':18 'cadenc':54 'code':22 'common':14 'current':34 'design':11 'develop':40 'fals':15 'fixtur':32 'includ':41 'indic':46 'linter':57 'ongo':47 'plugin':3,10,59 'posit':16 'pylint':1,5,9,20,55 'pylint-pytest':4 'pytest':2,6,25,56 'regular':52 'releas':53 'seri':45 'signific':48 'static':60 'suppress':13 'test':58 'unus':29 'unused-argu':28 'updat':49 'v2.0.0':43 'version':35 'written':23","created_at":"2026-04-14T18:40:04.759459+00:00","updated_at":"2026-04-16T18:32:02.574590+00:00","problems":{"verify_error":"no import statement found"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"1.1.8","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/pylint-dev/pylint-pytest","docs":"https://github.com/pylint-dev/pylint-pytest#readme","changelog":"https://github.com/pylint-dev/pylint-pytest/blob/master/CHANGELOG.md","pypi":"https://pypi.org/project/pylint-pytest/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"skip","verified_at":"2026-06-28","last_verified":"2026-06-28","next_check":"2026-07-05","install_tag":null}}