Task.current_task() and Task.all_tasks() have an optional loop parameter (#2690)

This commit is contained in:
Andrew Svetlov
2018-12-12 23:18:18 +02:00
committed by Jelle Zijlstra
parent d57e8c69f3
commit b9be76c255

View File

@@ -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]: ...