This is an automated email from the ASF dual-hosted git repository.
guanmingchiu pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/mahout.git
The following commit(s) were added to refs/heads/main by this push:
new 987a5886a MAHOUT-652: Add mypy for static type checking and lock file
checking (#654)
987a5886a is described below
commit 987a5886ab5eb5029324ec467e08b52b873e6dcc
Author: Ryan Huang <[email protected]>
AuthorDate: Sat Nov 29 22:15:27 2025 +0800
MAHOUT-652: Add mypy for static type checking and lock file checking (#654)
* Add mypy for static type checking
Added mypy static type checking to pre-commit hooks.
* pre-commit hook: fix
Signed-off-by: ryankert01 <[email protected]>
* update version and clean-up strings
Signed-off-by: ryankert01 <[email protected]>
---------
Signed-off-by: ryankert01 <[email protected]>
---
.pre-commit-config.yaml | 7 +++++++
testing/utils/qumat_helpers.py | 2 +-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 1a77115f7..819a366f0 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -22,6 +22,13 @@ repos:
name: ruff formatting
files: \.py$
+ # Static type checking
+ - repo: https://github.com/pre-commit/mirrors-mypy
+ rev: v1.19.0
+ hooks:
+ - id: mypy
+ args: ["--ignore-missing-imports"]
+
# Check Apache license headers
- repo: https://github.com/lucas-c/pre-commit-hooks
rev: v1.5.5
diff --git a/testing/utils/qumat_helpers.py b/testing/utils/qumat_helpers.py
index 26337075a..d97311bc4 100644
--- a/testing/utils/qumat_helpers.py
+++ b/testing/utils/qumat_helpers.py
@@ -70,7 +70,7 @@ def create_np_computational_basis_state(
def get_qumat_example_final_state_vector(
- backend_config: dict, initial_state_ket_str: BinaryString = "000"
+ backend_config: dict, initial_state_ket_str: BinaryString =
BinaryString("000")
):
n_qubits = len(initial_state_ket_str)
assert n_qubits == 3, print(