From 9db50a2baedaf658e730fec59c15ad3bdfc972d5 Mon Sep 17 00:00:00 2001 From: Justin Bollinger Date: Fri, 20 Feb 2026 21:34:39 -0500 Subject: [PATCH] fix: migrate prek.toml to repos format compatible with prek 0.3.3 The old commands = [...] format was a custom schema prek no longer supports. Rewrite as local-repo hooks (language: system, always_run: true) matching the pre-commit config schema prek 0.3.3 expects. Hooks are identical: ruff, ty, pytest, pytest-lima (pre-push) and audit-docs (post-commit). Co-Authored-By: Claude Sonnet 4.6 --- prek.toml | 57 ++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 46 insertions(+), 11 deletions(-) diff --git a/prek.toml b/prek.toml index 7968744..af40f9d 100644 --- a/prek.toml +++ b/prek.toml @@ -1,12 +1,47 @@ -[hooks.pre-push] -commands = [ - "uv run ruff check hate_crack", - "uv run ty check hate_crack", - "HATE_CRACK_SKIP_INIT=1 uv run pytest -q", - "HATE_CRACK_RUN_LIMA_TESTS=1 uv run pytest tests/test_lima_vm_install.py -v", -] +[[repos]] +repo = "local" -[hooks.post-commit] -commands = [ - "bash .claude/audit-docs.sh HEAD", -] +[[repos.hooks]] +id = "ruff" +name = "ruff" +entry = "uv run ruff check hate_crack" +language = "system" +stages = ["pre-push"] +pass_filenames = false +always_run = true + +[[repos.hooks]] +id = "ty" +name = "ty" +entry = "uv run ty check hate_crack" +language = "system" +stages = ["pre-push"] +pass_filenames = false +always_run = true + +[[repos.hooks]] +id = "pytest" +name = "pytest" +entry = "env HATE_CRACK_SKIP_INIT=1 uv run pytest -q" +language = "system" +stages = ["pre-push"] +pass_filenames = false +always_run = true + +[[repos.hooks]] +id = "pytest-lima" +name = "pytest-lima" +entry = "env HATE_CRACK_RUN_LIMA_TESTS=1 uv run pytest tests/test_lima_vm_install.py -v" +language = "system" +stages = ["pre-push"] +pass_filenames = false +always_run = true + +[[repos.hooks]] +id = "audit-docs" +name = "audit-docs" +entry = "bash .claude/audit-docs.sh HEAD" +language = "system" +stages = ["post-commit"] +pass_filenames = false +always_run = true