Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /SHAdd0WTAka_Zen-Ai-Pentest /scripts /debt_tracker.py
| #!/usr/bin/env python3 | |
| """Find and group TODO/FIXME/HACK/XXX comments in .py files by module.""" | |
| import re | |
| from collections import defaultdict | |
| from pathlib import Path | |
| BASE = Path(__file__).resolve().parent.parent | |
| MODULES = ["core", "agents", "api", "tools", "database", "orchestrator"] | |
| PATTERNS = re.compile(r"(?i)#\s*(TODO|FIXME|HACK|XXX)\b") | |
| def scan_module(name): | |
| mod_path = BASE / name | |
| if not mod_path.is_dir(): | |
| return None | |
| results = defaultdict(list) | |
| for f in sorted(mod_path.rglob("*.py")): | |
| for i, line in enumerate(f.read_text().splitlines(), 1): | |
| if PATTERNS.search(line): | |
| results[str(f.relative_to(BASE))].append((i, line.strip())) | |
| return results | |
| def main(): | |
| grand_total = 0 | |
| for mod in MODULES: | |
| results = scan_module(mod) | |
| if results is None: | |
| print(f"[{mod}] — directory not found\n") | |
| continue | |
| mod_total = sum(len(v) for v in results.values()) | |
| grand_total += mod_total | |
| print(f"[{mod}] {mod_total} debt item(s)\n") | |
| for filepath, items in sorted(results.items()): | |
| print(f" {filepath}") | |
| for line_no, text in items: | |
| print(f" L{line_no}: {text}") | |
| if results: | |
| print() | |
| print(f"Total debt items across all modules: {grand_total}") | |
| if __name__ == "__main__": | |
| main() | |
Xet Storage Details
- Size:
- 1.39 kB
- Xet hash:
- 2a67a21b1b450fb394918db97c2f53638dd38da3ec15faf3d4cd43f50ced9a57
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.