Skip to content

✨ Python reference: coroutines aren't clearly shown #4856

Closed

Description

@helderco

What are you trying to do?

The Python reference documentation doesn't clearly show a method as being a coroutine.

Screenshot 2023-03-29 at 17 12 08

Why is this important to you?

We used to have a note in the description clarifying that it needs to be awaited, but it was removed for simplicity. Making it clearer again can be helpful to users.

How are you currently working around this?

The IDE's autocomplete should show the return type as being a coroutine:
Screenshot 2023-02-22 at 12 25 06

In the reference you can notice that if it raises errors, then it's a coroutine because coroutines are only the methods that make a request to the API, which can return an error. It's also only when a simple value is returned (e.g., str primitive).
Screenshot 2023-03-29 at 16 58 33

Activity

  1. added
    area/documentation
    on Mar 29, 2023
  2. self-assigned this
    on Jul 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/documentation

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions