diff options
author | skullydazed <skullydazed@users.noreply.github.com> | 2020-04-18 13:00:56 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-18 22:00:56 +0200 |
commit | 66d94dc22af4fccae2af073c512662ce7eba7d98 (patch) | |
tree | a720968b0f1951cc2ec920da373701d308f04d88 /lib/python/qmk/cli/cformat.py | |
parent | 5a8f59503e41923030249561e9ef56be62de3efa (diff) | |
download | qmk_firmware-66d94dc22af4fccae2af073c512662ce7eba7d98.tar.gz qmk_firmware-66d94dc22af4fccae2af073c512662ce7eba7d98.zip |
Move everything to Python 3.6 (#8835)
Diffstat (limited to 'lib/python/qmk/cli/cformat.py')
-rw-r--r-- | lib/python/qmk/cli/cformat.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/python/qmk/cli/cformat.py b/lib/python/qmk/cli/cformat.py index 536ee30fd..0cd8b6192 100644 --- a/lib/python/qmk/cli/cformat.py +++ b/lib/python/qmk/cli/cformat.py | |||
@@ -22,9 +22,8 @@ def cformat_run(files, all_files): | |||
22 | cli.log.warn('No changes detected. Use "qmk cformat -a" to format all files') | 22 | cli.log.warn('No changes detected. Use "qmk cformat -a" to format all files') |
23 | return False | 23 | return False |
24 | if files and all_files: | 24 | if files and all_files: |
25 | cli.log.warning('Filenames passed with -a, only formatting: %s', ','.join(cli.args.files)) | 25 | cli.log.warning('Filenames passed with -a, only formatting: %s', ','.join(files)) |
26 | # 3.6+: Can remove the str casting, python will cast implicitly | 26 | subprocess.run(clang_format + [file for file in files], check=True) |
27 | subprocess.run(clang_format + [str(file) for file in files], check=True) | ||
28 | cli.log.info('Successfully formatted the C code.') | 27 | cli.log.info('Successfully formatted the C code.') |
29 | 28 | ||
30 | except subprocess.CalledProcessError: | 29 | except subprocess.CalledProcessError: |