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 using typing.overload with an async function that returns an AsyncGenerator or AsyncIterable, the overloads fail with Overloaded function implementation cannot produce return type of signature # when defined using async def
no errors when overloads are also defined with async def and error when overloads are defined with def
Actual Behavior
when overloads are defined with async def:
main.py:11: error: Overloaded function implementation cannot produce return type of signature 1 [misc]
main.py:11: error: Overloaded function implementation cannot produce return type of signature 2 [misc]
Found 2 errors in 1 file (checked 1 source file)
when overloads are defined with def: no errors
Your Environment
Mypy version used: 1.1.1 (mypy-play)
Python version used: 3.11 (mypy-play)
The text was updated successfully, but these errors were encountered:
Bug Report
When using
typing.overload
with an async function that returns anAsyncGenerator
orAsyncIterable
, the overloads fail withOverloaded function implementation cannot produce return type of signature #
when defined usingasync def
To Reproduce
Failure case: https://mypy-play.net/?mypy=latest&python=3.11&gist=f9b64edbf09acd4b1952f5753669c2e7
Unexpected success case: https://mypy-play.net/?mypy=latest&python=3.11&gist=2fcc9c2372664f4ce257a9cec2849698
Expected Behavior
no errors when overloads are also defined with
async def
and error when overloads are defined withdef
Actual Behavior
when overloads are defined with
async def
:when overloads are defined with
def
: no errorsYour Environment
The text was updated successfully, but these errors were encountered: