Search / scripts /check_python_static.py
vomebook
Organize static gate and JavaScript project configuration
7fd5ae8
Raw History Blame Contribute Delete
639 Bytes
"""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)