#14853·pytest

Expose FixtureFunctionDefinition as part of the public API

Author: adamtheturtleCreated Aug 11, 2026Updated Sep 27, 2026
Labelsgood first issuetopic: fixtures

There doesn’t appear to be a public type that can be used to annotate the result of pytest.fixture.

For example, consider a factory which creates fixtures:

python
from _pytest.fixtures import FixtureFunctionDefinition

def make_fixture(value: str) -> FixtureFunctionDefinition:
    @pytest.fixture
    def fixture() -> str:
        return value
    return fixture