A fixture is declared with pytest.yield_fixture, an alias that pytest deprecated and removed

tx0/python:pytest-yield-fixturerecommendedwarningsmell

What it finds

pytest.fixture has supported yield since pytest 3.0; yield_fixture was kept as a deprecated alias and removed in pytest 8. The fix renames it and is safe.

From the rule's source, pytest_yield_fixture.rs.

Example from the rule's tests
import pytest @pytest.yield_fixturetx0 reports: pytest.yield_fixture is a removed alias of pytest.fixturedef db():    yield 1 @pytest.fixturedef cache():    yield 2
Highlighted lines are the ones tx0 reports, with its message under each; the other lines are left alone.

Turn it on, off or suppress it

The rule runs from the recommended tier up. To turn it on in a lower tier, give it a level in tx0.toml:

tx0.toml
[rules]
"tx0/python:pytest-yield-fixture" = "warning"

To keep one finding, suppress it with a reason. tx0 suppress ID --reason "..." writes the comment on the line before the code:

# tx0: ignore[tx0/python:pytest-yield-fixture] reason="..."

tx0 explain tx0/python:pytest-yield-fixture shows the same in the terminal. Found a false positive? Report it.