massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stdlib / asyncio / coroutines.pyi
1 import sys
2 import types
3 from collections.abc import Callable, Coroutine
4 from typing import Any, TypeVar
5 from typing_extensions import TypeGuard
6
7 _F = TypeVar("_F", bound=Callable[..., Any])
8
9 def coroutine(func: _F) -> _F: ...
10 def iscoroutinefunction(func: object) -> bool: ...
11
12 if sys.version_info < (3, 8):
13     def iscoroutine(obj: object) -> TypeGuard[types.GeneratorType[Any, Any, Any] | Coroutine[Any, Any, Any]]: ...
14
15 else:
16     def iscoroutine(obj: object) -> TypeGuard[Coroutine[Any, Any, Any]]: ...