Skip to content

Commit 3854ac1

Browse files
Tweak pre-3.8 iscoroutine stub
1 parent 544c7c9 commit 3854ac1

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

stdlib/asyncio/coroutines.pyi

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import sys
2-
import types
32
from collections.abc import Coroutine
4-
from typing import Any
3+
from typing import Any, AwaitableGenerator
54
from typing_extensions import TypeGuard
65

76
if sys.version_info >= (3, 11):
@@ -24,4 +23,4 @@ if sys.version_info >= (3, 8):
2423
def iscoroutine(obj: object) -> TypeGuard[Coroutine[Any, Any, Any]]: ...
2524

2625
else:
27-
def iscoroutine(obj: object) -> TypeGuard[types.GeneratorType[Any, Any, Any] | Coroutine[Any, Any, Any]]: ...
26+
def iscoroutine(obj: object) -> TypeGuard[AwaitableGenerator[Any, Any, Any, Any] | Coroutine[Any, Any, Any]]: ...

0 commit comments

Comments
 (0)