File size: 639 Bytes
10fc3f9 7fd5ae8 10fc3f9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | """Check all repository-owned Python sources, not generated/vendor files."""
from __future__ import annotations
from pathlib import Path
import subprocess
import sys
root = Path(__file__).resolve().parent.parent
paths = [path.name for path in (root / "app.py", root / "backend", root / "scripts", root / "tests")
if path.exists()]
if not paths or not (root / "scripts").is_dir() or not (root / "tests").is_dir():
raise SystemExit("Static-check source inventory is incomplete")
print("Python static check:", ", ".join(paths), flush=True)
subprocess.run([sys.executable, "-m", "ruff", "check", *paths], cwd=root, check=True)
|