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:
Jelle Zijlstra
2018-12-20 15:24:03 -08:00
committed by GitHub
parent a2c0f4b827
commit 46ab77eb20

View File

@@ -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