This required a recent update to typeshed/mypy.
Fixes #3093
executor: Optional[concurrent.futures.Executor],
func: Callable[..., _T],
*args: Any
- ) -> Awaitable[_T]:
+ ) -> "Future[_T]":
"""Runs a function in a ``concurrent.futures.Executor``. If
``executor`` is ``None``, the IO loop's default executor will be used.
from typing import (
Any,
- Awaitable,
Callable,
Dict,
List,
executor: Optional[concurrent.futures.Executor],
func: Callable[..., _T],
*args: Any,
- ) -> Awaitable[_T]:
+ ) -> "asyncio.Future[_T]":
return self.asyncio_loop.run_in_executor(executor, func, *args)
def set_default_executor(self, executor: concurrent.futures.Executor) -> None: