File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ def find_device(
3636 """Search through the provided sequence of devices to find the one with the matching
3737 usage_page and usage."""
3838 if hasattr (devices , "send_report" ):
39- devices = [devices ]
39+ devices = [devices ] # type: ignore
4040 for device in devices :
4141 if (
4242 device .usage_page == usage_page
Original file line number Diff line number Diff line change 1717
1818from . import find_device
1919
20+ try :
21+ from typing import Sequence
22+ except : # pylint: disable=bare-except
23+ pass
2024
2125_MAX_KEYPRESSES = const (6 )
2226
@@ -35,7 +39,7 @@ class Keyboard:
3539
3640 # No more than _MAX_KEYPRESSES regular keys may be pressed at once.
3741
38- def __init__ (self , devices : list [usb_hid .Device ]) -> None :
42+ def __init__ (self , devices : Sequence [usb_hid .Device ]) -> None :
3943 """Create a Keyboard object that will send keyboard HID reports.
4044
4145 Devices can be a sequence of devices that includes a keyboard device or a keyboard device
You can’t perform that action at this time.
0 commit comments