Replace | typing usage with Optional and Union

This commit is contained in:
Josh Wu
2023-09-12 15:45:05 +08:00
parent 1e00c8f456
commit f39f5f531c
8 changed files with 19 additions and 11 deletions

View File

@@ -4397,7 +4397,7 @@ class HCI_Event(HCI_Packet):
if len(parameters) != length:
raise ValueError('invalid packet length')
cls: Type[HCI_Event | HCI_LE_Meta_Event] | None
cls: Any
if event_code == HCI_LE_META_EVENT:
# We do this dispatch here and not in the subclass in order to avoid call
# loops