| 1351 | |
| 1352 | |
| 1353 | def _clear_pycache_dirs(root: Path) -> List[str]: |
| 1354 | removed: List[str] = [] |
| 1355 | if not root.exists(): |
| 1356 | return removed |
| 1357 | for path in sorted((p for p in root.rglob("__pycache__") if p.is_dir()), key=lambda p: len(p.parts), reverse=True): |
| 1358 | rel = path.relative_to(root).as_posix() |
| 1359 | shutil.rmtree(path, ignore_errors=True) |
| 1360 | removed.append(rel) |
| 1361 | return removed |
| 1362 | |
| 1363 | |
| 1364 | def run_self_check(source_path: Path, output_dir: Path, *, expect_report: bool = True, report_name: str = "FRAMEWORK.md") -> bool: |