* Mypy: Initial support

 * Add to pre-commit (currently installs own deps, could maybe changed
   to poetry venv in the future to reuse environment and don't need
   duplicated types deps).
 * Add type hints.

* Mypy: Add missing annotations
This commit is contained in:
Dominique Lasserre
2024-11-26 22:28:05 +01:00
committed by GitHub
parent 2a163569bc
commit 1163ddb4ac
31 changed files with 637 additions and 531 deletions

View File

@@ -72,3 +72,25 @@ convention = "google"
minversion = "8.3.3"
pythonpath = [ "src", ]
testpaths = [ "tests", ]
[tool.mypy]
files = ["src", "tests"]
exclude = "class_soc_calc\\.py$"
check_untyped_defs = true
warn_unused_ignores = true
[[tool.mypy.overrides]]
module = "akkudoktoreos.*"
disallow_untyped_defs = true
[[tool.mypy.overrides]]
module = "sklearn.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "deap.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "xprocess.*"
ignore_missing_imports = true