mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-30 08:04:24 +08:00
loop argument to asyncio.ensure_future is Optional (#2708)
The default value is None: https://github.com/python/cpython/blob/master/Lib/asyncio/tasks.py#L616.
This commit is contained in:
@@ -24,7 +24,7 @@ ALL_COMPLETED: str
|
||||
def as_completed(fs: Sequence[_FutureT[_T]], *, loop: AbstractEventLoop = ...,
|
||||
timeout: Optional[float] = ...) -> Iterator[Future[_T]]: ...
|
||||
def ensure_future(coro_or_future: _FutureT[_T],
|
||||
*, loop: AbstractEventLoop = ...) -> Future[_T]: ...
|
||||
*, loop: Optional[AbstractEventLoop] = ...) -> Future[_T]: ...
|
||||
# Prior to Python 3.7 'async' was an alias for 'ensure_future'.
|
||||
# It became a keyword in 3.7.
|
||||
@overload
|
||||
|
||||
Reference in New Issue
Block a user