chore: add MyPy type checking config with baseline ignore rules
Adds [tool.mypy] section to pyproject.toml with permissive baseline settings and disables error codes that fire against the existing untyped codebase. Adds the mirrors-mypy pre-commit hook (v1.19.1) running over python/ at once. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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: []
|
||||
|
||||
@@ -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",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user