We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
asyncio.isfuture
TypeGuard
1 parent 220a8d1 commit 749d3dbCopy full SHA for 749d3db
stdlib/asyncio/base_futures.pyi
@@ -1,6 +1,6 @@
1
import sys
2
from typing import Any, Callable, Sequence
3
-from typing_extensions import Literal
+from typing_extensions import Literal, TypeGuard
4
5
if sys.version_info >= (3, 7):
6
from contextvars import Context
@@ -11,7 +11,7 @@ _PENDING: Literal["PENDING"] # undocumented
11
_CANCELLED: Literal["CANCELLED"] # undocumented
12
_FINISHED: Literal["FINISHED"] # undocumented
13
14
-def isfuture(obj: object) -> bool: ...
+def isfuture(obj: object) -> TypeGuard[futures.Future[Any]]: ...
15
16
17
def _format_callbacks(cb: Sequence[tuple[Callable[[futures.Future[Any]], None], Context]]) -> str: ... # undocumented
0 commit comments