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

Replace | typing usage with Optional and Union #281

Merged
merged 1 commit into from
Sep 13, 2023

Conversation

zxzxwu
Copy link
Collaborator

@zxzxwu zxzxwu commented Sep 12, 2023

No description provided.

@zxzxwu zxzxwu merged commit 4ed5bb5 into google:main Sep 13, 2023
16 checks passed
@@ -4397,7 +4397,7 @@ def from_bytes(packet: bytes) -> HCI_Event:
if len(parameters) != length:
raise ValueError('invalid packet length')

cls: Type[HCI_Event | HCI_LE_Meta_Event] | None
cls: Any
Copy link
Collaborator

Choose a reason for hiding this comment

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

why any?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

cls is a local variable here, so it's not really necessary to provide a type hint here(still we need a placeholder otherwise mypy will be unhappy to the reassignment).

@zxzxwu zxzxwu deleted the cleanup-transport branch December 2, 2023 15:38
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