diff --git a/scripts/check-super-imports.py b/scripts/check-super-imports.py index 11e541d1db..5083e20c08 100644 --- a/scripts/check-super-imports.py +++ b/scripts/check-super-imports.py @@ -13,8 +13,8 @@ # limitations under the License. import os -import re from multiprocessing import Pool +from pathlib import Path def find_rust_files(directory): @@ -24,6 +24,10 @@ def find_rust_files(directory): if "test" in root.lower(): continue + # Skip the target directory + if "target" in Path(root).parts: + continue + for file in files: # Skip files with "test" in the filename if "test" in file.lower():