Skip to content

Commit

Permalink
keyboard.py: allow 'import usb_hid' to fail
Browse files Browse the repository at this point in the history
  • Loading branch information
dhalbert committed Sep 8, 2024
1 parent be6db46 commit 8f2f9f5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/pycqa/pylint
rev: v2.17.4
rev: v3.2.7
hooks:
- id: pylint
name: pylint (library code)
Expand Down
4 changes: 2 additions & 2 deletions adafruit_hid/keyboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
"""

from micropython import const
import usb_hid

from .keycode import Keycode

from . import find_device

try:
from typing import Sequence
except: # pylint: disable=bare-except
import usb_hid
except ImportError:
pass

_MAX_KEYPRESSES = const(6)
Expand Down

0 comments on commit 8f2f9f5

Please sign in to comment.