add TypeGuard to coroutines.iscoroutine (#6105)

make CoroutineType extend Coroutine
This commit is contained in:
KotlinIsland
2021-10-10 01:01:36 +10:00
committed by GitHub
parent e018ad66dc
commit b7d1d099d9
3 changed files with 21 additions and 9 deletions

View File

@@ -62,7 +62,7 @@ else:
def iscoroutinefunction(object: object) -> bool: ...
def isgenerator(object: object) -> TypeGuard[GeneratorType[Any, Any, Any]]: ...
def iscoroutine(object: object) -> TypeGuard[CoroutineType]: ...
def iscoroutine(object: object) -> TypeGuard[CoroutineType[Any, Any, Any]]: ...
def isawaitable(object: object) -> TypeGuard[Awaitable[Any]]: ...
if sys.version_info >= (3, 8):