Skip to content

mypy should use CoroutineType instead of Coroutine for return types of async def functions #18635

Open
@A5rocks

Description

@A5rocks

Feature

types.CoroutineType is defined as:

The type of coroutine objects, created by async def functions.

Evidently, async def functions return them. For context, they're a subclass of collections.abc.Coroutine with extra features.

Pitch

#18634 ran into this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions