Skip to content

Commit 0ed4929

Browse files
committed
Add pep8-naming to our python linting
1 parent a2c6257 commit 0ed4929

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

bin/qmk

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ with open(os.path.join(qmk_dir, 'requirements.txt'), 'r') as fd:
2525
line = line.split('#')[0]
2626

2727
module = line.split('=')[0] if '=' in line else line
28+
29+
if module in ['pep8-naming']:
30+
# Not every module is importable by its own name.
31+
continue
32+
2833
if not find_spec(module):
2934
print('Could not find module %s!' % module)
3035
print('Please run `pip3 install -r requirements.txt` to install the python dependencies.')

lib/python/qmk/cli/doctor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def doctor(cli):
3939
ok = False
4040

4141
# Determine our OS and run platform specific tests
42-
OS = platform.system()
42+
OS = platform.system() # noqa (N806), uppercase name is ok in this instance
4343

4444
if OS == "Darwin":
4545
cli.log.info("Detected {fg_cyan}macOS.")

lib/python/qmk/tests/test_qmk_errors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from qmk.errors import NoSuchKeyboardError
22

33

4-
def test_NoSuchKeyboardError():
4+
def test_nosuchkeyboarderror():
55
try:
66
raise NoSuchKeyboardError("test message")
77
except NoSuchKeyboardError as e:

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ colorama
66
hjson
77
nose2
88
flake8
9+
pep8-naming

0 commit comments

Comments
 (0)