Skip to content

Unannotated async function should be inferred as Awaitable[Any] #12776

Open
@Dreamsorcerer

Description

@Dreamsorcerer

An async function with no return type declaration, like:
async def foo():

This is inferred as returning Any, but should be inferred as returning Awaitable[Any]. The result of this has caused us to miss a bunch of unused awaitable warnings via incomplete stubs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugmypy got something wrongtopic-asyncasync, await, asyncio

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions