in scripts/clean.py [0:0]
def remove_recursively(pattern: str, exclude_dirs: List[str] = []):
files = glob.glob(f"**/{pattern}", recursive=True)
def is_excluded(file: str) -> bool:
return any(dir in file for dir in exclude_dirs)
for file in files:
if not is_excluded(file):
remove_dir(file)