diff --git a/utils_maintenance/autopep8_format_paths.py b/utils_maintenance/autopep8_format_paths.py index e6f3cd7b00b1ea2b6ed8564f357e74b665e2ba33..1eead25d8e0eda744be6282ca2d3fb1e0c8e77e9 100644 --- a/utils_maintenance/autopep8_format_paths.py +++ b/utils_maintenance/autopep8_format_paths.py @@ -32,6 +32,13 @@ def compute_paths(paths, use_default_paths): "source", "tests", ) + else: + # Filter out files, this is only done so this utility wont print that it's + # "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.sep != "/": paths = [f.replace("/", os.sep) for f in paths] diff --git a/utils_maintenance/clang_format_paths.py b/utils_maintenance/clang_format_paths.py index c0671d4d3a8cb552cabb2391194c89ed11f451ba..e81d487c294b7248fc5d4979f156e0d370376042 100755 --- a/utils_maintenance/clang_format_paths.py +++ b/utils_maintenance/clang_format_paths.py @@ -59,6 +59,13 @@ def compute_paths(paths, use_default_paths): "source", "tests/gtests", ) + else: + # Filter out files, this is only done so this utility wont print that it's + # "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.sep != "/": paths = [f.replace("/", os.sep) for f in paths]