Skip to content
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

Awaitable instances not correctly detected #431

Closed
petri opened this issue Sep 28, 2020 · 2 comments
Closed

Awaitable instances not correctly detected #431

petri opened this issue Sep 28, 2020 · 2 comments
Labels
bug Something isn't working fixed in next version (main) A fix has been implemented and will appear in an upcoming version

Comments

@petri
Copy link

petri commented Sep 28, 2020

Environment data

MacOS Catalina 10.15.6, Pylance v2020.9.6

Expected behaviour

Do not flag the awaitable class instance as not awaitable

Actual behaviour

Awaitable class instance is marked as non-awaitable.

Logs

image

Code Snippet / Additional information

from collections.abc import Awaitable


class MyAwaitable(Awaitable):
    "test awaitable"

    def __await__(self):
        yield


async def test():
    "test coro"

    await MyAwaitable()
@petri petri changed the title Awaitables not correctly detected Awaitable instances not correctly detected Sep 28, 2020
@erictraut
Copy link
Contributor

Thanks for the bug report. This will be fixed in the next release of Pylance.

@erictraut erictraut added bug Something isn't working fixed in next version (main) A fix has been implemented and will appear in an upcoming version labels Sep 28, 2020
@github-actions github-actions bot removed the triage label Sep 28, 2020
@jakebailey
Copy link
Member

This issue has been fixed in version 2020.9.7, which we've just released. You can find the changelog here: https://github.com/microsoft/pylance-release/blob/master/CHANGELOG.md#202097-30-september-2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed in next version (main) A fix has been implemented and will appear in an upcoming version
Projects
None yet
Development

No branches or pull requests

3 participants