aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorGravatar skullY <skullydazed@gmail.com>2020-01-11 12:15:28 -0800
committerGravatar skullydazed <skullydazed@users.noreply.github.com>2020-01-11 12:18:30 -0800
commit81ec3b5f81b3b8f83b763782fffd71ffe3540f56 (patch)
tree5ff64f7030f1769a653e1eda36e87882bcdfb7f9 /lib
parent8f47e62b36cae15f989aaaa93caf05d4de258fb7 (diff)
downloadqmk_firmware-81ec3b5f81b3b8f83b763782fffd71ffe3540f56.tar.gz
yapf and style
Diffstat (limited to 'lib')
-rwxr-xr-xlib/python/qmk/cli/doctor.py21
1 files changed, 10 insertions, 11 deletions
diff --git a/lib/python/qmk/cli/doctor.py b/lib/python/qmk/cli/doctor.py
index 28bf57a7d..6ddc5571b 100755
--- a/lib/python/qmk/cli/doctor.py
+++ b/lib/python/qmk/cli/doctor.py
@@ -10,7 +10,8 @@ import glob
from milc import cli
-def _udev_rule(vid, pid = None):
+
+def _udev_rule(vid, pid=None):
""" Helper function that return udev rules
"""
if pid:
@@ -18,6 +19,7 @@ def _udev_rule(vid, pid = None):
else:
return 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="%s", MODE:="0666"' % vid
+
@cli.subcommand('Basic QMK environment checks')
def doctor(cli):
"""Basic QMK environment checks.
@@ -57,17 +59,14 @@ def doctor(cli):
# Checking for udev rules
udev_dir = "/etc/udev/rules.d/"
# These are the recommended udev rules
- desired_rules = dict(dfu = {_udev_rule("03eb", "2ff4"),_udev_rule("03eb", "2ffb"), _udev_rule("03eb", "2ff0")},
-
- tmk = {_udev_rule("feed")},
-
- input_club = {_udev_rule("1c11")},
-
- stm32 = {_udev_rule("1eaf", "0003"),_udev_rule("0483", "df11")},
+ desired_rules = {
+ 'dfu': {_udev_rule("03eb", "2ff4"), _udev_rule("03eb", "2ffb"), _udev_rule("03eb", "2ff0")},
+ 'tmk': {_udev_rule("feed")},
+ 'input_club': {_udev_rule("1c11")},
+ 'stm32': {_udev_rule("1eaf", "0003"), _udev_rule("0483", "df11")},
+ 'caterina': {'ATTRS{idVendor}=="2a03", ENV{ID_MM_DEVICE_IGNORE}="1"', 'ATTRS{idVendor}=="2341", ENV{ID_MM_DEVICE_IGNORE}="1"'},
+ }
- caterina = {'ATTRS{idVendor}=="2a03", ENV{ID_MM_DEVICE_IGNORE}="1"',
- 'ATTRS{idVendor}=="2341", ENV{ID_MM_DEVICE_IGNORE}="1"'}
- )
if os.path.exists(udev_dir):
udev_rules = [rule for rule in glob.iglob(os.path.join(udev_dir, "*.rules")) if os.path.isfile(rule)]
# Collect all rules from the config files