diff --git a/tornado/ioloop.py b/tornado/ioloop.py index 450fbf9484d29cfdac54c417f50c5a0286aac9e5..cdfb4a630fd063f61b2818ea5d5f9dd1b38636fd 100644 --- a/tornado/ioloop.py +++ b/tornado/ioloop.py @@ -711,7 +711,7 @@ class IOLoop(Configurable): 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. diff --git a/tornado/platform/asyncio.py b/tornado/platform/asyncio.py index 32fe860a66fc7bdd39b2429060315e493f7a1685..8d16aa6d15be0f7c537bb5e99f32fe5d87f4a8d5 100644 --- a/tornado/platform/asyncio.py +++ b/tornado/platform/asyncio.py @@ -37,7 +37,6 @@ from tornado.ioloop import IOLoop, _Selectable from typing import ( Any, - Awaitable, Callable, Dict, List, @@ -237,7 +236,7 @@ class BaseAsyncIOLoop(IOLoop): 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: