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
When syncing typeshed in #11905, the type of asyncio.sleep was changed from: def sleep(delay: float, result: _T = ...) -> Future[_T]: ... to async def sleep(delay: float, result: _T = ...) -> _T: ...
This change somehow exposed an issue in type inference.
The test expects the following to reveal Future[list[Any]] in the following, after the typeshed change, the test reveals Future[Any]:
While investigating this I noticed something weird. If you add another reveal_type, mypy is once again able to infer the better Future[list[Any]] type. That is, the following shows Future[list[Any]] for the outer reveal_type.
Activity
hauntsaninja commentedon Dec 28, 2024
Looks like this is better now