You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The arguments of the tornado.concurrent.chain_future method are annotated with the asyncio.Future type. The documentation and implementation of this method on the other hand indicates it also supports concurrent.futures.Future instances. This way mypy raises a type error when a concurrent.futures.Future instances is used.
This method has always accepted both asyncio and concurrent futures,
but the type hint incorrectly indicated that it only accepted asyncio
futures.
Fixestornadoweb#3314
Problem description:
The arguments of the
tornado.concurrent.chain_future
method are annotated with theasyncio.Future
type. The documentation and implementation of this method on the other hand indicates it also supportsconcurrent.futures.Future
instances. This way mypy raises a type error when aconcurrent.futures.Future
instances is used.Reproductive example:
Mypy output:
Expected behavior:
The
chain_future()
method has a type annotation that also acceptsconcurrent.futures.Future
instances and mypy doesn't raise a type error.The text was updated successfully, but these errors were encountered: