aboutsummaryrefslogtreecommitdiff
path: root/lib/python/qmk
diff options
context:
space:
mode:
authorZach White <skullydazed@gmail.com>2021-08-29 16:50:22 -0700
committerGitHub <noreply@github.com>2021-08-29 16:50:22 -0700
commit596c4a1f87b46e1858c7d3630802eec741d1cc28 (patch)
tree4985aa763eca968615ae7b8004261fa76262a389 /lib/python/qmk
parentb46064a891332db07643f73018910c031a63aa50 (diff)
downloadqmk_firmware-596c4a1f87b46e1858c7d3630802eec741d1cc28.tar.gz
qmk_firmware-596c4a1f87b46e1858c7d3630802eec741d1cc28.zip
Remove bin/qmk (#14231)
* Remove the bin/qmk script * remove bin/qmk from workflows
Diffstat (limited to 'lib/python/qmk')
-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
-rw-r--r--lib/python/qmk/commands.py2
-rw-r--r--lib/python/qmk/tests/test_cli_commands.py2
5 files changed, 6 insertions, 7 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
diff --git a/lib/python/qmk/commands.py b/lib/python/qmk/commands.py
index 421453d83..01c23b261 100644
--- a/lib/python/qmk/commands.py
+++ b/lib/python/qmk/commands.py
@@ -233,7 +233,7 @@ def compile_configurator_json(user_keymap, bootloader=None, parallel=1, **env_va
233 f'VERBOSE={verbose}', 233 f'VERBOSE={verbose}',
234 f'COLOR={color}', 234 f'COLOR={color}',
235 'SILENT=false', 235 'SILENT=false',
236 f'QMK_BIN={"bin/qmk" if "DEPRECATED_BIN_QMK" in os.environ else "qmk"}', 236 'QMK_BIN="qmk"',
237 ]) 237 ])
238 238
239 return make_command 239 return make_command
diff --git a/lib/python/qmk/tests/test_cli_commands.py b/lib/python/qmk/tests/test_cli_commands.py
index b39fe5e46..e4eaef899 100644
--- a/lib/python/qmk/tests/test_cli_commands.py
+++ b/lib/python/qmk/tests/test_cli_commands.py
@@ -83,7 +83,7 @@ def test_hello():
83def test_format_python(): 83def test_format_python():
84 result = check_subcommand('format-python', '--dry-run') 84 result = check_subcommand('format-python', '--dry-run')
85 check_returncode(result) 85 check_returncode(result)
86 assert 'Python code in `bin/qmk` and `lib/python` is correctly formatted.' in result.stdout 86 assert 'Python code in `lib/python` is correctly formatted.' in result.stdout
87 87
88 88
89def test_list_keyboards(): 89def test_list_keyboards():