1
0
Fork 0

Fix "No C files in filelist: None" (#15560)

* Fix "No C files in filelist: None"

* Align other commands

* force absolute paths
This commit is contained in:
Joel Challis 2022-01-03 21:54:46 +00:00 committed by GitHub
parent a88dc08643
commit aea7155423
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 11 deletions

View file

@ -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)