diff --git a/utils_maintenance/autopep8_format_paths.py b/utils_maintenance/autopep8_format_paths.py index 100a308..664b297 100644 --- a/utils_maintenance/autopep8_format_paths.py +++ b/utils_maintenance/autopep8_format_paths.py @@ -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 != "/": diff --git a/utils_maintenance/clang_format_paths.py b/utils_maintenance/clang_format_paths.py index e81d487..f2334ce 100755 --- a/utils_maintenance/clang_format_paths.py +++ b/utils_maintenance/clang_format_paths.py @@ -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 != "/":