Type checking async iterator methods with mypy not working correctly #412
Labels
bug
Something isn't working
good first issue
Good for newcomers
small
Low effort issue that can easily be picked up
When you try to type check method that returns stream mypy will complain about incompatible type with supertype. This is due to the fact that for mypy to consider something AsyncIterator it needs to have yield somewhere in it's implementation.
So something like this is considered Coroutine[Any, Any, AsyncIterator]], while
would be AsyncIterator["OrderTruckResponse"].
For more info check mypy issue.
python/mypy#12662
The text was updated successfully, but these errors were encountered: