-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Functions returning AsyncIterator shouldn't be async def
#298
Comments
Does pyright also misinterpret |
I don't think mypy's behavior is incorrect here, but documenting this gotcha is a good idea. |
I was using the word "misinterpret" in a highly confusing way, to mean "misinterprets what the author of the stub meant to convey" rather than "did something incorrect". Bad choice of words from me :) |
Sorry for misinterpreting you! |
@JelleZijlstra do you fancy tackling this? I'm pretty sure the code changes should be trivial, but I'm not sure I have a precise enough understanding of the problem to be able to write a good error message here. |
I answered a question on Stackoverflow about this confusion. Feel free to link to it or copy any of the contents: |
For what it's worth, I documented this behaviour at https://mypy.readthedocs.io/en/latest/more_types.html#asynchronous-iterators a couple weeks ago |
See python/typeshed#8960.
The text was updated successfully, but these errors were encountered: