Add pep8-naming to our python linting 0.7.96
authorskullY <skullydazed@gmail.com>
Sat, 23 Nov 2019 18:42:39 +0000 (10:42 -0800)
committerskullydazed <skullydazed@users.noreply.github.com>
Sun, 1 Dec 2019 21:40:14 +0000 (13:40 -0800)
bin/qmk
lib/python/qmk/cli/doctor.py
lib/python/qmk/tests/test_qmk_errors.py
requirements.txt

diff --git a/bin/qmk b/bin/qmk
index 4d5b3d8..60555d3 100755 (executable)
--- a/bin/qmk
+++ b/bin/qmk
@@ -25,6 +25,11 @@ with open(os.path.join(qmk_dir, 'requirements.txt'), 'r') as fd:
             line = line.split('#')[0]
 
         module = line.split('=')[0] if '=' in line else line
+
+        if module in ['pep8-naming']:
+            # Not every module is importable by its own name.
+            continue
+
         if not find_spec(module):
             print('Could not find module %s!' % module)
             print('Please run `pip3 install -r requirements.txt` to install the python dependencies.')
index 1010eaf..2421e52 100755 (executable)
@@ -39,7 +39,7 @@ def doctor(cli):
                 ok = False
 
     # Determine our OS and run platform specific tests
-    OS = platform.system()
+    OS = platform.system()  # noqa (N806), uppercase name is ok in this instance
 
     if OS == "Darwin":
         cli.log.info("Detected {fg_cyan}macOS.")
index 1d8690b..948e7ef 100644 (file)
@@ -1,7 +1,7 @@
 from qmk.errors import NoSuchKeyboardError
 
 
-def test_NoSuchKeyboardError():
+def test_nosuchkeyboarderror():
     try:
         raise NoSuchKeyboardError("test message")
     except NoSuchKeyboardError as e:
index 033b688..074b11a 100644 (file)
@@ -6,3 +6,4 @@ colorama
 hjson
 nose2
 flake8
+pep8-naming