We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5a5b923 commit e873972Copy full SHA for e873972
1 file changed
usb_device.py
@@ -167,7 +167,7 @@ def device_id(self) -> str:
167
return f"{self.vendor_id:04x}:{self.product_id:04x}:{self._serial_number}"
168
return f"{self.vendor_id:04x}:{self.product_id:04x}"
169
170
- def to_dict(self) -> Dict[str, Optional[str]]:
+ def to_dict(self) -> dict[str, str | None]:
171
"""Get basic device information as a dictionary.
172
173
Returns:
@@ -434,7 +434,7 @@ def find_by_identity(
434
435
return None
436
437
- def find_by_binding(self, binding: Dict[str, str]) -> Optional[USBDevice]:
+ def find_by_binding(self, binding: dict[str, str]) -> USBDevice | None:
438
"""Find a device that matches a binding configuration.
439
440
The binding dictionary should contain 'vendor_id', 'product_id',
0 commit comments