AsyncGenerator abstractmethods typechecked as coroutine incorrectly #2287
Labels
bug
Something isn't working
fixed in next version (main)
A fix has been implemented and will appear in an upcoming version
I'm trying to define an abstract base class with an
abstractmethod
that returns anAsyncGenerator
. The typechecker appears to operate inconsistently between usages of the abstract base vs concrete implementations.E.g.
Removing
async
from theabstractmethod
causes the error to disappear, but I don't believe this is the correct annotation (and pylint also reports it as an error that the base class signature does not match the concrete class). This doesn't appear to report an error when running pyright 1.1.208 directly.pyrightconfig.json:
I'm running Pylance v2022.1.3 on VS Code Version: 1.63.2 (Universal) (Mac OS)
The text was updated successfully, but these errors were encountered: