Skip to content

Commit

Permalink
Add pep8-naming to our python linting
Browse files Browse the repository at this point in the history
  • Loading branch information
skullydazed committed Dec 1, 2019
1 parent a2c6257 commit 0ed4929
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions bin/qmk
Original file line number Diff line number Diff line change
Expand Up @@ -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.')
Expand Down
2 changes: 1 addition & 1 deletion lib/python/qmk/cli/doctor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand Down
2 changes: 1 addition & 1 deletion lib/python/qmk/tests/test_qmk_errors.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from qmk.errors import NoSuchKeyboardError


def test_NoSuchKeyboardError():
def test_nosuchkeyboarderror():
try:
raise NoSuchKeyboardError("test message")
except NoSuchKeyboardError as e:
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ colorama
hjson
nose2
flake8
pep8-naming

0 comments on commit 0ed4929

Please sign in to comment.