amends "package://github.com/jdx/hk/releases/download/v1.39.0/hk@1.39.0#/Config.pkl"
import "package://github.com/jdx/hk/releases/download/v1.39.0/hk@1.39.0#/Builtins.pkl"

local linters = new Mapping<String, Step> {
    ["ruff"] {
        glob = List("**/*.py")
        check = "uv run ruff check"
        fix = "uv run ruff check --fix"
    }
    ["pytest"] {
        glob = List("**/*.py", "features/**")
        check = "PLAYWRIGHT_BROWSERS_PATH=/usr/local/share/ms-playwright uv run python -m pytest tests/ -v --timeout=120"
    }
}

hooks {
    ["pre-commit"] {
        fix = true
        stash = "git"
        steps = linters
    }
}
