diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f0600a7..226d6ae 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -35,3 +35,12 @@ repos: - id: flake8 files: ^python/ args: [--config=.flake8] + + - repo: https://github.com/pre-commit/mirrors-mypy + rev: "v1.19.1" + hooks: + - id: mypy + files: ^python/ + args: [--config-file=pyproject.toml] + pass_filenames: false + additional_dependencies: [] diff --git a/pyproject.toml b/pyproject.toml index 9ab3555..c0ee5c1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,3 +10,27 @@ target-version = ["py310"] [tool.isort] profile = "black" line_length = 100 + +[tool.mypy] +python_version = "3.10" +warn_return_any = false +warn_unused_configs = true +ignore_missing_imports = true +check_untyped_defs = false +disallow_untyped_defs = false +disable_error_code = [ + "arg-type", + "attr-defined", + "union-attr", + "call-arg", + "assignment", + "var-annotated", + "annotation-unchecked", + "index", + "has-type", + "dict-item", + "misc", + "list-item", + "return-value", + "operator", +]