aboutsummaryrefslogtreecommitdiff
path: root/lib/python/qmk/cli
diff options
context:
space:
mode:
Diffstat (limited to 'lib/python/qmk/cli')
-rw-r--r--lib/python/qmk/cli/doctor/check.py1
-rwxr-xr-xlib/python/qmk/cli/format/python.py6
-rw-r--r--lib/python/qmk/cli/pytest.py2
3 files changed, 4 insertions, 5 deletions
diff --git a/lib/python/qmk/cli/doctor/check.py b/lib/python/qmk/cli/doctor/check.py
index 0807f4151..2d691b64b 100644
--- a/lib/python/qmk/cli/doctor/check.py
+++ b/lib/python/qmk/cli/doctor/check.py
@@ -26,7 +26,6 @@ ESSENTIAL_BINARIES = {
26 'arm-none-eabi-gcc': { 26 'arm-none-eabi-gcc': {
27 'version_arg': '-dumpversion' 27 'version_arg': '-dumpversion'
28 }, 28 },
29 'bin/qmk': {},
30} 29}
31 30
32 31
diff --git a/lib/python/qmk/cli/format/python.py b/lib/python/qmk/cli/format/python.py
index 00612f97e..b32a72640 100755
--- a/lib/python/qmk/cli/format/python.py
+++ b/lib/python/qmk/cli/format/python.py
@@ -11,15 +11,15 @@ def format_python(cli):
11 """Format python code according to QMK's style. 11 """Format python code according to QMK's style.
12 """ 12 """
13 edit = '--diff' if cli.args.dry_run else '--in-place' 13 edit = '--diff' if cli.args.dry_run else '--in-place'
14 yapf_cmd = ['yapf', '-vv', '--recursive', edit, 'bin/qmk', 'lib/python'] 14 yapf_cmd = ['yapf', '-vv', '--recursive', edit, 'lib/python']
15 try: 15 try:
16 cli.run(yapf_cmd, check=True, capture_output=False, stdin=DEVNULL) 16 cli.run(yapf_cmd, check=True, capture_output=False, stdin=DEVNULL)
17 cli.log.info('Python code in `bin/qmk` and `lib/python` is correctly formatted.') 17 cli.log.info('Python code in `lib/python` is correctly formatted.')
18 return True 18 return True
19 19
20 except CalledProcessError: 20 except CalledProcessError:
21 if cli.args.dry_run: 21 if cli.args.dry_run:
22 cli.log.error('Python code in `bin/qmk` and `lib/python` incorrectly formatted!') 22 cli.log.error('Python code in `lib/python` is incorrectly formatted!')
23 else: 23 else:
24 cli.log.error('Error formatting python code!') 24 cli.log.error('Error formatting python code!')
25 25
diff --git a/lib/python/qmk/cli/pytest.py b/lib/python/qmk/cli/pytest.py
index bdb336b9a..a7f01a872 100644
--- a/lib/python/qmk/cli/pytest.py
+++ b/lib/python/qmk/cli/pytest.py
@@ -12,6 +12,6 @@ def pytest(cli):
12 """Run several linting/testing commands. 12 """Run several linting/testing commands.
13 """ 13 """
14 nose2 = cli.run(['nose2', '-v'], capture_output=False, stdin=DEVNULL) 14 nose2 = cli.run(['nose2', '-v'], capture_output=False, stdin=DEVNULL)
15 flake8 = cli.run(['flake8', 'lib/python', 'bin/qmk'], capture_output=False, stdin=DEVNULL) 15 flake8 = cli.run(['flake8', 'lib/python'], capture_output=False, stdin=DEVNULL)
16 16
17 return flake8.returncode | nose2.returncode 17 return flake8.returncode | nose2.returncode