Skip to content

Commit 3e27786

Browse files
authored
Make FixtureFuction type alias instead of TypeVar (#14339)
Both times, it only appears once in a function signature. Therefore, the TypeVar has no effect. pyright warns about this too.
1 parent fc54e35 commit 3e27786

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/_pytest/fixtures.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@
8282

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

0 commit comments

Comments
 (0)