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
Closing this. The code above was wrong. It should have been:
g: int=awaitasyncio.shield(f)
Interesting though is that if the result of await asyncio.shield(...) is not captured in a variable, mypy expects asyncio.Future[<nothing>] for the input of shield. This means we have to assign the result, even when not used.
Take the following code:
It's not obvious why we would expect a future of a future.
I don't see anything wrong in the type annotations: https://github.com/python/typeshed/blob/master/stdlib/3/asyncio/tasks.pyi#L87 so maybe a bug in mypy?
The text was updated successfully, but these errors were encountered: