-
Notifications
You must be signed in to change notification settings - Fork 281
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
AsyncIterator output type for abstract method #1473
Comments
This is actually correct and works exactly the same way in mypy:
See here for the explanation: https://stackoverflow.com/a/68911014 If removing |
This is also now explained in mypy docs. See the last example on this page: https://mypy.readthedocs.io/en/latest/more_types.html#typing-async-await |
That was indeed my confusion. Many thanks for the references! |
Consider following example:
Output of pytype is:
Simply removing the
async
keyword from the definition ofBaseTestClass.count
makes pytype run successfully. This is unexpected, since now the derived functionTestClass.count
does not have the same signature as its base class. Running pylint on the file will now instead fail.The text was updated successfully, but these errors were encountered: