MLBEDSW-3367 Add mypy to pre-commit
Add mypy to pre-commit and clean up all reported errors.
Signed-off-by: Jonas Ohlsson <jonas.ohlsson@arm.com>
Change-Id: If7dc869f5fecdb0e2db40f14e7d9db21aa33df71
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 8e976b6..ae2bae5 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -1,5 +1,14 @@
exclude: '^ethosu/vela/(tflite|ethos_u55_regs|tosa)/'
repos:
+- repo: https://github.com/pre-commit/mirrors-mypy
+ rev: 'v0.931'
+ hooks:
+ - id: mypy
+ args: ["--no-strict-optional", "--show-error-codes", "--ignore-missing-imports"]
+ require_serial: true
+ additional_dependencies: [types-setuptools]
+ minimum_pre_commit_version: '2.9.2'
+
- repo: https://github.com/asottile/reorder_python_imports
rev: v2.2.0
hooks: