diff options
Diffstat (limited to 'lib/python/qmk/cli/format/python.py')
-rwxr-xr-x | lib/python/qmk/cli/format/python.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/python/qmk/cli/format/python.py b/lib/python/qmk/cli/format/python.py index 47b5c45fd5..008622cac1 100755 --- a/lib/python/qmk/cli/format/python.py +++ b/lib/python/qmk/cli/format/python.py @@ -25,8 +25,9 @@ def yapf_run(files): def filter_files(files): """Yield only files to be formatted and skip the rest """ + files = list(map(normpath, filter(None, files))) for file in files: - if file and normpath(file).name.split('.')[-1] in py_file_suffixes: + if file.suffix[1:] in py_file_suffixes: yield file else: cli.log.debug('Skipping file %s', file) |