Skip to content

Commit 4c7cfb4

Browse files
committed
refactor: Narrowed down return type of pytest_pycollect_makeitem_convert_async_functions_to_subclass.
1 parent 34d4aae commit 4c7cfb4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pytest_asyncio/plugin.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
overload,
3131
)
3232

33+
import pluggy
3334
import pytest
3435
from pytest import (
3536
Class,
@@ -539,13 +540,12 @@ def pytest_pycollect_makeitem_preprocess_async_fixtures(
539540
return None
540541

541542

542-
# TODO: #778 Narrow down return type of function when dropping support for pytest 7
543543
# The function name needs to start with "pytest_"
544544
# see https://github.com/pytest-dev/pytest/issues/11307
545545
@pytest.hookimpl(specname="pytest_pycollect_makeitem", hookwrapper=True)
546546
def pytest_pycollect_makeitem_convert_async_functions_to_subclass(
547547
collector: Union[pytest.Module, pytest.Class], name: str, obj: object
548-
) -> Generator[None, Any, None]:
548+
) -> Generator[None, pluggy.Result, None]:
549549
"""
550550
Converts coroutines and async generators collected as pytest.Functions
551551
to AsyncFunction items.

0 commit comments

Comments
 (0)