Skip to content

Commit d1979f5

Browse files
authored
Merge pull request #128 from dhalbert/usb-hid-keyboard
keyboard.py: allow 'import usb_hid' to fail
2 parents be6db46 + 8f2f9f5 commit d1979f5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ repos:
1818
- id: end-of-file-fixer
1919
- id: trailing-whitespace
2020
- repo: https://github.com/pycqa/pylint
21-
rev: v2.17.4
21+
rev: v3.2.7
2222
hooks:
2323
- id: pylint
2424
name: pylint (library code)

adafruit_hid/keyboard.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@
1010
"""
1111

1212
from micropython import const
13-
import usb_hid
1413

1514
from .keycode import Keycode
1615

1716
from . import find_device
1817

1918
try:
2019
from typing import Sequence
21-
except: # pylint: disable=bare-except
20+
import usb_hid
21+
except ImportError:
2222
pass
2323

2424
_MAX_KEYPRESSES = const(6)

0 commit comments

Comments
 (0)