收緊模組化治理掃描範圍

This commit is contained in:
OoO
2026-05-13 12:12:27 +08:00
parent 86fc9c94c7
commit ec93d09c18
2 changed files with 9 additions and 2 deletions

View File

@@ -7,11 +7,17 @@ GUIDE = ROOT / "docs/guides/modularization_governance.md"
def _python_line_counts():
ignored_parts = {".git", "venv", "backups", "__pycache__", ".pytest_cache"}
ignored_parts = {".git", ".venv", "venv", "backups", "tests", "__pycache__", ".pytest_cache"}
ignored_prefixes = {
("docs", "design"),
("docs", "design_audit_frontend"),
}
for path in ROOT.rglob("*.py"):
parts = path.relative_to(ROOT).parts
if any(part in ignored_parts for part in parts):
continue
if parts[:2] in ignored_prefixes:
continue
if len(parts) >= 2 and parts[0] == ".claude" and parts[1] == "worktrees":
continue
with path.open(encoding="utf-8", errors="ignore") as handle: