From 72a5bf25c8dcb2fc448acb1f523d2c8849674bca Mon Sep 17 00:00:00 2001
From: Moul <moul@moul.re>
Date: Sun, 5 Jun 2022 16:42:21 +0200
Subject: [PATCH] [mypy] #163: Introduce mypy pre-commit hook

Install types-tabulate subs:
  - TODO: to be removed once tabulate has been dropped
ignore_missing_imports: Ignore dependencies such as DuniterPy
---
 .pre-commit-config.yaml | 7 +++++++
 pyproject.toml          | 3 +++
 2 files changed, 10 insertions(+)

diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index fc4e10fd..12b80309 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -19,6 +19,13 @@ repos:
     hooks:
     - id: isort
       args: ["--profile", "black"]
+-   repo: https://github.com/pre-commit/mirrors-mypy
+    rev: v0.960
+    hooks:
+    - id: mypy
+      args:
+        - "--install-types"
+        - "--non-interactive"
 -   repo: https://github.com/asottile/pyupgrade
     rev: v2.32.1
     hooks:
diff --git a/pyproject.toml b/pyproject.toml
index 408fc06a..cf6b98f9 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -44,3 +44,6 @@ classifiers = [
 [tool.isort]
 profile = "black"
 src_paths = ["silkaj", "tests"]
+
+[tool.mypy]
+ignore_missing_imports = true
-- 
GitLab