#!/bin/sh
# pmq pre-push guard: refuse to push red. CI is the backstop; this catches
# it before the remote does. Bypass knowingly with --no-verify.
set -e
cd "$(git rev-parse --show-toplevel)"
PY=./.venv/bin/python
[ -x "$PY" ] || PY=python3
$PY -m ruff check . || { echo "pre-push: ruff rouge"; exit 1; }
$PY -m mypy || { echo "pre-push: mypy rouge"; exit 1; }
$PY -m pytest -q || { echo "pre-push: tests rouges"; exit 1; }
