Download scripts/check_python_static.py from VoiceOfML/Search: direct link, hf CLI and curl.
- Browser
- Download file 639 Bytes
-
https://huggingface.co/spaces/VoiceOfML/Search/resolve/main/scripts/check_python_static.py
- Command line
-
hf download hf://spaces/VoiceOfML/Search/scripts/check_python_static.py
-
curl -L -o check_python_static.py https://huggingface.co/spaces/VoiceOfML/Search/resolve/main/scripts/check_python_static.py
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) | |