From 485779e85f4d573f77d9ef06c58cb47e3fc934a2 Mon Sep 17 00:00:00 2001 From: Xuehai Pan Date: Thu, 2 Jan 2025 17:54:40 +0800 Subject: [PATCH] feat(pre-commit): add `mypy` to pre-commit hook --- .pre-commit-config.yaml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 22439d6e..63c978f0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -30,7 +30,7 @@ repos: hooks: - id: clang-format - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.8.6 + rev: v0.9.0 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] @@ -63,6 +63,15 @@ repos: hooks: - id: codespell additional_dependencies: [".[toml]"] + - repo: https://github.com/pre-commit/mirrors-mypy + rev: v1.14.1 + hooks: + - id: mypy + exclude: | + (?x)( + ^tests/| + ^setup.py$ + ) - repo: local hooks: - id: pylint