mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
Task.current_task() and Task.all_tasks() have an optional loop parameter (#2690)
This commit is contained in:
committed by
Jelle Zijlstra
parent
d57e8c69f3
commit
b9be76c255
@@ -60,9 +60,9 @@ def wait_for(fut: _FutureT[_T], timeout: Optional[float],
|
||||
|
||||
class Task(Future[_T], Generic[_T]):
|
||||
@classmethod
|
||||
def current_task(cls, loop: AbstractEventLoop = ...) -> Task: ...
|
||||
def current_task(cls, loop: Optional[AbstractEventLoop] = ...) -> Task: ...
|
||||
@classmethod
|
||||
def all_tasks(cls, loop: AbstractEventLoop = ...) -> Set[Task]: ...
|
||||
def all_tasks(cls, loop: Optional[AbstractEventLoop] = ...) -> Set[Task]: ...
|
||||
def __init__(self, coro: Union[Generator[Any, None, _T], Awaitable[_T]], *, loop: AbstractEventLoop = ...) -> None: ...
|
||||
def __repr__(self) -> str: ...
|
||||
def get_stack(self, *, limit: int = ...) -> List[FrameType]: ...
|
||||
|
||||
Reference in New Issue
Block a user