From f47c87f51f91db8280787994084f0e6c42b8583a Mon Sep 17 00:00:00 2001 From: Alexander Hess Date: Tue, 1 Dec 2026 17:14:47 +0100 Subject: [PATCH] Add the "test-types" session as a `pre-commit` hook --- .forgejo/workflows/ci.yaml | 2 +- .pre-commit-config.yaml | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.forgejo/workflows/ci.yaml b/.forgejo/workflows/ci.yaml index befe23e..3d1ebb5 100644 --- a/.forgejo/workflows/ci.yaml +++ b/.forgejo/workflows/ci.yaml @@ -87,4 +87,4 @@ jobs: - name: Run the `pre-commit` hooks not covered by `nox` run: uv run pre-commit run --all-files --show-diff-on-failure env: - SKIP: local-format,local-lint,local-test,local-doctest,no-commit-to-branch + SKIP: local-format,local-lint,local-test,local-doctest,local-test-types,no-commit-to-branch diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 12a17a2..d639534 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -56,6 +56,15 @@ repos: always_run: true require_serial: true + - id: local-test-types + name: Check the type annotations at runtime + entry: uv run nox -s test-types + language: unsupported + stages: [pre-merge-commit] + pass_filenames: false # => No `--` at the end of the "entry" + always_run: true + require_serial: true + # Keep requirements.txt in sync with uv.lock - repo: https://github.com/astral-sh/uv-pre-commit rev: 0.13.10