fix(lint): lint all the things; be more flexible in boards dir
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
import usb_hid
|
||||
from micropython import const
|
||||
|
||||
from kmk.keys import FIRST_KMK_INTERNAL_KEY, ConsumerKey, ModifierKey
|
||||
from storage import getmount
|
||||
|
||||
from kmk.keys import FIRST_KMK_INTERNAL_KEY, ConsumerKey, ModifierKey
|
||||
|
||||
try:
|
||||
from adafruit_ble import BLERadio
|
||||
from adafruit_ble.advertising.standard import ProvideServicesAdvertisement
|
||||
@@ -259,7 +260,7 @@ class BLEHID(AbstractHID):
|
||||
@property
|
||||
def devices(self):
|
||||
'''Search through the provided list of devices to find the ones with the
|
||||
send_report attribute.'''
|
||||
send_report attribute.'''
|
||||
if not self.ble.connected:
|
||||
return []
|
||||
|
||||
|
@@ -22,7 +22,7 @@ class KeyAttrDict(AttrDict):
|
||||
def __getattr__(self, key):
|
||||
try:
|
||||
return super(KeyAttrDict, self).__getattr__(key)
|
||||
except:
|
||||
except Exception:
|
||||
pass
|
||||
# Modifiers
|
||||
if key in ('LEFT_CONTROL', 'LCTRL', 'LCTL'):
|
||||
@@ -514,7 +514,7 @@ class KeyAttrDict(AttrDict):
|
||||
elif key in ('HID_SWITCH', 'HID'):
|
||||
make_key(names=('HID_SWITCH', 'HID'), on_press=handlers.hid_switch)
|
||||
else:
|
||||
raise ValueError("Invalid key")
|
||||
raise ValueError('Invalid key')
|
||||
return self.__getattr__(key)
|
||||
|
||||
|
||||
|
@@ -43,7 +43,7 @@ class ModTap(Module):
|
||||
return keyboard
|
||||
|
||||
def mt_released(self, key, keyboard, *args, **kwargs):
|
||||
''' On keyup, check timer, and press key if needed.'''
|
||||
'''On keyup, check timer, and press key if needed.'''
|
||||
keyboard.keys_pressed.discard(key.meta.mods)
|
||||
if self._mod_tap_timer and (
|
||||
accurate_ticks_diff(
|
||||
|
@@ -2,11 +2,11 @@
|
||||
import busio
|
||||
from micropython import const
|
||||
|
||||
from kmk.hid import HIDModes
|
||||
from storage import getmount
|
||||
|
||||
from kmk.kmktime import ticks_diff, ticks_ms
|
||||
from kmk.matrix import intify_coordinate
|
||||
from kmk.modules import Module
|
||||
from storage import getmount
|
||||
|
||||
|
||||
class SplitSide:
|
||||
@@ -141,8 +141,10 @@ class Split(Module):
|
||||
def after_matrix_scan(self, keyboard):
|
||||
if keyboard.matrix_update:
|
||||
if self.split_type == SplitType.UART and self._is_target:
|
||||
pass # explicit pass just for dev sanity...
|
||||
elif self.split_type == SplitType.UART and (self.data_pin2 or not self._is_target):
|
||||
pass # explicit pass just for dev sanity...
|
||||
elif self.split_type == SplitType.UART and (
|
||||
self.data_pin2 or not self._is_target
|
||||
):
|
||||
self._send_uart(keyboard.matrix_update)
|
||||
elif self.split_type == SplitType.BLE:
|
||||
self._send_ble(keyboard.matrix_update)
|
||||
|
Reference in New Issue
Block a user