From 845e23200d471e44f274940846e400d170b5ff37 Mon Sep 17 00:00:00 2001 From: Jonas Ohlsson Date: Tue, 1 Mar 2022 12:39:55 +0100 Subject: MLBEDSW-3367 Add mypy to pre-commit Add mypy to pre-commit and clean up all reported errors. Signed-off-by: Jonas Ohlsson Change-Id: If7dc869f5fecdb0e2db40f14e7d9db21aa33df71 --- .pre-commit-config.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to '.pre-commit-config.yaml') diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8e976b65..ae2bae58 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: -- cgit v1.2.1