Skip to content

Commit 631dd86

Browse files
committed
fixtures: make the FixtureValue TypeVar covariant
This TypeVar represents the return value of the fixture function, so should be covariant.
1 parent c8a4618 commit 631dd86

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/_pytest/fixtures.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282

8383

8484
# The value of the fixture -- return/yield of the fixture function (type variable).
85-
FixtureValue = TypeVar("FixtureValue")
85+
FixtureValue = TypeVar("FixtureValue", covariant=True)
8686
# The type of the fixture function (type variable).
8787
FixtureFunction = TypeVar("FixtureFunction", bound=Callable[..., object])
8888
# The type of a fixture function (type alias generic in fixture value).

0 commit comments

Comments
 (0)