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(
36
36
"""Search through the provided sequence of devices to find the one with the matching
37
37
usage_page and usage."""
38
38
if hasattr (devices , "send_report" ):
39
- devices = [devices ]
39
+ devices = [devices ] # type: ignore
40
40
for device in devices :
41
41
if (
42
42
device .usage_page == usage_page
Original file line number Diff line number Diff line change 17
17
18
18
from . import find_device
19
19
20
+ try :
21
+ from typing import Sequence
22
+ except : # pylint: disable=bare-except
23
+ pass
20
24
21
25
_MAX_KEYPRESSES = const (6 )
22
26
@@ -35,7 +39,7 @@ class Keyboard:
35
39
36
40
# No more than _MAX_KEYPRESSES regular keys may be pressed at once.
37
41
38
- def __init__ (self , devices : list [usb_hid .Device ]) -> None :
42
+ def __init__ (self , devices : Sequence [usb_hid .Device ]) -> None :
39
43
"""Create a Keyboard object that will send keyboard HID reports.
40
44
41
45
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