Skip to content

Commit e873972

Browse files
author
Alexander Brinkman
committed
code
1 parent 5a5b923 commit e873972

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

usb_device.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def device_id(self) -> str:
167167
return f"{self.vendor_id:04x}:{self.product_id:04x}:{self._serial_number}"
168168
return f"{self.vendor_id:04x}:{self.product_id:04x}"
169169

170-
def to_dict(self) -> Dict[str, Optional[str]]:
170+
def to_dict(self) -> dict[str, str | None]:
171171
"""Get basic device information as a dictionary.
172172
173173
Returns:
@@ -434,7 +434,7 @@ def find_by_identity(
434434

435435
return None
436436

437-
def find_by_binding(self, binding: Dict[str, str]) -> Optional[USBDevice]:
437+
def find_by_binding(self, binding: dict[str, str]) -> USBDevice | None:
438438
"""Find a device that matches a binding configuration.
439439
440440
The binding dictionary should contain 'vendor_id', 'product_id',

0 commit comments

Comments
 (0)