Skip to content

Commit 02139b0

Browse files
committed
Use pytest's FixtureDef type
1 parent 9e254b4 commit 02139b0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pytest_asyncio/plugin.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,11 @@
6161
FixtureFunction = Union[SimpleFixtureFunction, FactoryFixtureFunction]
6262
FixtureFunctionMarker = Callable[[FixtureFunction], FixtureFunction]
6363

64-
# https://github.com/pytest-dev/pytest/pull/9510
65-
FixtureDef = Any
64+
# https://github.com/pytest-dev/pytest/commit/fb55615d5e999dd44306596f340036c195428ef1
65+
if pytest.version_tuple >= (8, 0):
66+
from pytest import FixtureDef
67+
else:
68+
FixtureDef = Any
6669

6770

6871
class PytestAsyncioError(Exception):

0 commit comments

Comments
 (0)