Skip to content

fix missing await in async create_client #859

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

Merged
merged 1 commit into from
Jul 16, 2024
Merged

Conversation

realChesta
Copy link
Contributor

What kind of change does this PR introduce?

The async create_client method is calling AsyncClient.create without awaiting it, leading to the return of a nested coroutine and falsifying the return type of create_client.

What is the current behavior?

Users of create_client need to use a double await to use this function, which doesn't correspond to the indicated return type.

What is the new behavior?

The method now correctly returns a coroutine that returns an AsyncClient on completion.

@realChesta realChesta requested a review from a team as a code owner July 16, 2024 16:14
Copy link
Contributor

sourcery-ai bot commented Jul 16, 2024

🧙 Sourcery has finished reviewing your pull request!


Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • Continue your discussion with Sourcery by replying directly to review comments.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've reviewed this pull request using the Sourcery rules engine. If you would also like our AI-powered code review then let us know.

@silentworks silentworks merged commit 07c75ee into supabase:main Jul 16, 2024
6 checks passed
@silentworks silentworks linked an issue Jul 16, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

missing await in async create_client on 2.5.2 and up
2 participants