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

refactor(api): conditionally import usb dep #15247

Merged
merged 1 commit into from
May 22, 2024

Conversation

sfoster1
Copy link
Member

@sfoster1 sfoster1 commented May 22, 2024

I think the intent was always that AsyncByonoy and thus pyusb would only be imported when actually building an AsyncByonoy instance, but at some point it got imported globally for a typecheck. Make that typecheck typecheck-only with a different name, and the problem goes away.
Other side of #15206

I think the intent was always that AsyncByonoy and thus pyusb would only
be improted when actually building an AsyncByonoy instance, but at some
point it got imported globally for a typecheck. Make that typecheck
typecheck-only with a different name, and the problem goes away.
@sfoster1 sfoster1 marked this pull request as ready for review May 22, 2024 15:34
@sfoster1 sfoster1 requested a review from a team as a code owner May 22, 2024 15:34
@sfoster1 sfoster1 requested a review from ahiuchingau May 22, 2024 15:34
Copy link
Contributor

@SyntaxColoring SyntaxColoring left a comment

Choose a reason for hiding this comment

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

Makes sense. Might be worth a comment explaining why the import needs to be conditional.

Copy link
Contributor

@ahiuchingau ahiuchingau left a comment

Choose a reason for hiding this comment

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

Thank you

@sfoster1 sfoster1 merged commit ccc944e into edge May 22, 2024
26 of 27 checks passed
@sfoster1 sfoster1 deleted the remove-default-async-byonoy-import branch May 22, 2024 18:44
ryanthecoder pushed a commit that referenced this pull request May 28, 2024
I think the intent was always that AsyncByonoy and thus pyusb would only
be imported when actually building an AsyncByonoy instance, but at some
point it got imported globally for a typecheck. Make that typecheck
typecheck-only with a different name, and the problem goes away.
 Other side of #15206
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.

None yet

3 participants