Skip to content

Use inspect.isawaitable instead of custom is_awaitable helper function #163

@bartenra

Description

@bartenra

Since Python 3.5 there's an inspect.isawaitable function.

I believe the is_awaitable function in the code base should be removed. Instead, the function part of the standard library should be used.

I was having issues because I was using __getattr__ in a class and is_awaitable helper uses hasattr(value, "__await__"), resulting in a false positive.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions