Add type hints

Related #2273
This commit is contained in:
MattHag
2024-11-05 00:24:50 +01:00
committed by Peter F. Patel-Schneider
parent 267b0a723d
commit 0bf7a78553
6 changed files with 23 additions and 16 deletions

View File

@@ -228,7 +228,7 @@ class _DeviceMonitor(Thread):
def _match(
action: str,
device,
device: dict[str, Any],
filter_func: Callable[[int, int, int, bool, bool], dict[str, Any]],
):
"""
@@ -393,7 +393,7 @@ def open(vendor_id, product_id, serial=None):
return device_handle
def open_path(device_path) -> Any:
def open_path(device_path: str) -> int:
"""Open a HID device by its path name.
:param device_path: the path of a ``DeviceInfo`` tuple returned by enumerate().