Skip to content

Inspections Reference

All inspections provided by BetterPy. Each can be configured in Settings → Editor → Inspections → BetterPy.

Inspection Maturity Description Group
@pytest.mark.usefixtures on fixture is a no-op inspection Incubating Reports @pytest.mark.usefixtures decorators on fixture functions, where they have no effect — pytest only honours usefixtures on test functions Testing (Pytest)
Constant should be Final inspection Stable Reports module-level constants that should be annotated with Final Code Quality & Safety
Fixture annotation mismatch inspection Incubating Reports test or fixture parameters whose explicit type annotation is incompatible with the value type provided by the resolved fixture Testing (Pytest)
Missing pytest test directory Incubating Highlights configured pytest testpaths that do not exist and offers to create them Testing (Pytest)
Missing |None annotation inspection Incubating Adds a quickfix for PyCharm's missing | None annotation inspection Typing & Type Hints
Mock unresolved reference inspection Stable Reports unresolved references in mock usage Testing (Pytest)
Overridden method missing type annotations inspection Incubating Reports overrides missing type annotations present in parent methods Typing & Type Hints
Private module import inspection Stable Reports private-module imports that should use public package exports Code Quality & Safety
Pytest failed line inspection Incubating Marks the line where a pytest test failed Testing (Pytest)
Pytest fixture direct import inspection Incubating Reports pytest fixture functions imported directly into conftest.py — prefer pytest_plugins for explicit scoping Testing (Pytest)
Pytest fixture override contract inspection Incubating Reports fixture overrides whose produced value type is incompatible with the parent fixture Testing (Pytest)
Pytest fixture redundant parameter inspection Incubating Reports fixture parameters that are already injected automatically via autouse, usefixtures on the enclosing class, or module-level pytestmark, and are not referenced in the function body. Testing (Pytest)
Pytest fixture scope inspection Incubating Reports fixtures that narrow the scope compared to parent fixtures Testing (Pytest)
Pytest fixture to usefixtures inspection Incubating Reports unused setup-only fixture parameters in test functions and offers conversion to @pytest.mark.usefixtures() Testing (Pytest)
Pytest fixture uninjected reference inspection Incubating Reports fixture references inside tests/fixtures that are not declared as parameters Testing (Pytest)
Pytest missing assert inspection Incubating Reports pytest tests that have no Python assert statement or explicitly return a value, including asserts reached through project helper calls Testing (Pytest)
Pytest parametrize count mismatch inspection Incubating Reports when the number of values in a pytest.mark.parametrize value set does not match the number of parameter names Testing (Pytest)
Pytest parametrize ids count inspection Incubating Reports when the number of ids in a pytest.mark.parametrize call does not match the number of parameter sets Testing (Pytest)
Pytest parametrize unexpected keyword inspection Incubating Reports unsupported keyword arguments passed to pytest.mark.parametrize Testing (Pytest)
Pytest parametrize unused argname inspection Incubating Reports pytest.parametrize argnames that are never used inside the test function body Testing (Pytest)
Pytest redundant fixture import inspection Incubating Reports explicitly imported pytest fixtures that are already auto-discoverable via conftest or plugins. Testing (Pytest)
Shadowing stdlib module inspection Stable Reports project modules that shadow Python standard library modules Code Quality & Safety
Unknown dynamic pytest fixture inspection Incubating Reports string-based fixture requests (usefixtures, getfixturevalue, indirect parametrize) that do not resolve to any visible fixture Testing (Pytest)
Unnecessary inspection suppressions Stable Detects redundant inspection IDs in Python noinspection comments and removes them safely. Code Quality & Safety
Unused pytest fixture inspection Incubating Reports pytest fixture functions that are never used as a parameter in any test or other fixture in the project, and offers a safe-delete quick fix Testing (Pytest)
pytest_plugins in non-root conftest inspection Incubating Reports pytest_plugins assignments that appear in a non-root conftest.py file, where they have no effect Testing (Pytest)
request.param without params inspection Incubating Reports pytest fixtures that read request.param but declare no params= and are not the target of any indirect parametrization Testing (Pytest)