Skip to content
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

Missing overload for get_client() #14104

Closed
3 tasks done
hikariatama opened this issue Jun 18, 2024 · 1 comment
Closed
3 tasks done

Missing overload for get_client() #14104

hikariatama opened this issue Jun 18, 2024 · 1 comment
Labels
enhancement An improvement of an existing feature

Comments

@hikariatama
Copy link

First check

  • I added a descriptive title to this issue.
  • I used the GitHub search to find a similar request and didn't find it.
  • I searched the Prefect documentation for this feature.

Prefect Version

3.x

Describe the current behavior

Due to missing overload, pyright reports

async with get_client(sync_client=False) as client:
    ...

as error, since get_client returns Union["PrefectClient", "SyncPrefectClient"].

Describe the proposed behavior

Add typing overloads for client to get rid of error at least with the explicit argument sync_client

Example Use

No response

Additional context

No response

@hikariatama hikariatama added enhancement An improvement of an existing feature needs:triage Needs feedback from the Prefect product team labels Jun 18, 2024
@desertaxle
Copy link
Member

Thanks for the issue @hikariatama! This was fixed in #13763 and the fix is available in 3.0.0rc3. I'm going to close this, but feel free to reply if you encounter any other issues with get_client typing!

@desertaxle desertaxle removed the needs:triage Needs feedback from the Prefect product team label Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An improvement of an existing feature
Projects
None yet
Development

No branches or pull requests

2 participants