From c7118d49b813e4580e595786a93e77d541ccf8d7 Mon Sep 17 00:00:00 2001 From: shenxianpeng Date: Tue, 28 Apr 2026 16:08:47 +0300 Subject: [PATCH] Add mypy type checking to pre-commit hooks Add 'hatch run types:check' as a pre-commit hook to catch type errors before they reach CI. Uses pass_filenames: false since mypy needs to check the entire project (not just staged files). This matches the existing 'hatch run types:check' command documented in CONTRIBUTING.md. --- .pre-commit-config.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 90033bfa..6f7119c0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -43,3 +43,10 @@ repos: entry: npm exec --yes -- jshint language: system files: ^mkdocs/.*\.js$ + - id: mypy + name: mypy + entry: hatch run types:check + language: system + pass_filenames: false + always_run: false + require_serial: true