aboutsummaryrefslogtreecommitdiff
path: root/lib/python/qmk/cli/format/python.py
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/cli/format/python.py
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/cli/format/python.py')
-rwxr-xr-xlib/python/qmk/cli/format/python.py6
1 files changed, 3 insertions, 3 deletions
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