Skip to content

Commit d79dd18

Browse files
authored
Merge pull request #89 from tekktrik/hotfix/fix_usb_hid_device
Fix typing for usb_hid.Device
2 parents c0eb696 + 2bcc8d3 commit d79dd18

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

adafruit_hid/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929

3030

3131
def find_device(
32-
devices: Sequence[usb_hid.device], *, usage_page: int, usage: int
33-
) -> usb_hid.device:
32+
devices: Sequence[usb_hid.Device], *, usage_page: int, usage: int
33+
) -> usb_hid.Device:
3434
"""Search through the provided sequence of devices to find the one with the matching
3535
usage_page and usage."""
3636
if hasattr(devices, "send_report"):

adafruit_hid/consumer_control.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
class ConsumerControl:
3232
"""Send ConsumerControl code reports, used by multimedia keyboards, remote controls, etc."""
3333

34-
def __init__(self, devices: Sequence[usb_hid.device]) -> None:
34+
def __init__(self, devices: Sequence[usb_hid.Device]) -> None:
3535
"""Create a ConsumerControl object that will send Consumer Control Device HID reports.
3636
3737
Devices can be a sequence of devices that includes a Consumer Control device or a CC device

adafruit_hid/keyboard.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class Keyboard:
3939

4040
# No more than _MAX_KEYPRESSES regular keys may be pressed at once.
4141

42-
def __init__(self, devices: Sequence[usb_hid.device]) -> None:
42+
def __init__(self, devices: Sequence[usb_hid.Device]) -> None:
4343
"""Create a Keyboard object that will send keyboard HID reports.
4444
4545
Devices can be a sequence of devices that includes a keyboard device or a keyboard device

adafruit_hid/mouse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class Mouse:
2929
MIDDLE_BUTTON = 4
3030
"""Middle mouse button."""
3131

32-
def __init__(self, devices: Sequence[usb_hid.device]):
32+
def __init__(self, devices: Sequence[usb_hid.Device]):
3333
"""Create a Mouse object that will send USB mouse HID reports.
3434
3535
Devices can be a sequence of devices that includes a keyboard device or a keyboard device

0 commit comments

Comments
 (0)