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 |None annotation inspection | Incubating | Adds a quickfix for PyCharm's missing | None annotation inspection | Typing & Type Hints |
| 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 scope inspection | Incubating | Reports fixtures that narrow the scope compared to parent fixtures | Testing (Pytest) |
| Pytest fixture uninjected reference inspection | Incubating | Reports fixture references inside tests/fixtures that are not declared as parameters | 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) |
| 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) |