Fix error passing in directories to clang & autopep8 utilities

Error in [0] broke "make format PATHS=source/creator" for e.g.

Thanks to @aras_p for pointing out & suggesting the fix.

[0]: 93a5e1a46b
This commit is contained in:
Campbell Barton
2022-05-10 18:40:54 +10:00
parent c1586ae295
commit 86093aef40
2 changed files with 2 additions and 2 deletions

View File

@ -35,7 +35,7 @@ def compute_paths(paths, use_default_paths):
else:
paths = [
f for f in paths
if os.path.isfile(f) and f.endswith(extensions)
if os.path.isdir(f) or (os.path.isfile(f) and f.endswith(extensions))
]
if os.sep != "/":

View File

@ -64,7 +64,7 @@ def compute_paths(paths, use_default_paths):
# "Operating" on files that will be filtered out later on.
paths = [
f for f in paths
if os.path.isfile(f) and f.endswith(extensions)
if os.path.isdir(f) or (os.path.isfile(f) and f.endswith(extensions))
]
if os.sep != "/":