pytest-fixture-returns-bare-tuple
Pytest fixture exposes a fixed positional record as an unnamed tuple.
Why
Tuple-shaped fixture APIs encode each value's role in its position, so call sites are opaque and a reordered result can silently bind the wrong test dependency.
Fix
Return a NamedTuple, frozen dataclass, or another result object and access its named fields; split independent values into separate fixtures when they do not form one record. Keep the tuple and use an exact SARJ044 suppression when tuple identity or ordering is itself the tested domain contract.
Examples
import pytest
@pytest.fixturedef stores(): return org_store, user_storedef test_user_lookup(stores): org_store, user_store = stores assert user_store.get("u1")import pytest
from tests.support.stores import Stores
@pytest.fixturedef stores() -> Stores: return Stores(org=org_store, user=user_store)from dataclasses import dataclass
@dataclass(frozen=True)class Stores: org: object user: objectfrom tests.support.stores import Stores
def test_user_lookup(stores: Stores): assert stores.user.get("u1")Formerly: fixture-returns-bare-tuple