We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9b86402 commit e99357fCopy full SHA for e99357f
stdlib/asyncio/coroutines.pyi
@@ -1,7 +1,12 @@
1
+import collections.abc
2
+import types
3
from typing import Any, Callable, TypeVar
4
+from typing_extensions import TypeGuard
5
6
_F = TypeVar("_F", bound=Callable[..., Any])
7
8
+_COROUTINE_TYPE = types.CoroutineType | types.GeneratorType | collections.abc.Coroutine
9
+
10
def coroutine(func: _F) -> _F: ...
11
def iscoroutinefunction(func: object) -> bool: ...
-def iscoroutine(obj: object) -> bool: ...
12
+def iscoroutine(obj: object) -> TypeGuard[_COROUTINE_TYPE]: ...
0 commit comments