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 final line yields a mypy error error: Argument 1 to "get_from" has incompatible type "Foo[int]"; expected "Foo[object]"
I can reproduce this on a variety of mypy and Python versions on mypy-play.net; I couldn't find any that didn't exhibit this behavior. But if I reverse the comparison order (assert await get_from(foo) == 42), or make get_from() return T instead of Awaitable[T], the bug goes away.
I can still reproduce this bug if I replace get_from() with
but without the async and await it goes away. I doubt it actually has anything to do with async; I would imagine it just needs a sufficiently complex return type after desugaring.
The text was updated successfully, but these errors were encountered:
When I type-check the following:
the final line yields a mypy error
error: Argument 1 to "get_from" has incompatible type "Foo[int]"; expected "Foo[object]"
I can reproduce this on a variety of mypy and Python versions on mypy-play.net; I couldn't find any that didn't exhibit this behavior. But if I reverse the comparison order (
assert await get_from(foo) == 42
), or make get_from() return T instead of Awaitable[T], the bug goes away.I can still reproduce this bug if I replace
get_from()
withbut without the
async
andawait
it goes away. I doubt it actually has anything to do with async; I would imagine it just needs a sufficiently complex return type after desugaring.The text was updated successfully, but these errors were encountered: