From 874fa9233d51d9a4d719e9304ba0522663f4dffc Mon Sep 17 00:00:00 2001 From: Cristian Le Date: Fri, 11 Aug 2023 18:49:31 +0200 Subject: [PATCH] Add mypy Signed-off-by: Cristian Le --- .pre-commit-config.yaml | 8 ++++++++ pyproject.toml | 9 +++++++++ 2 files changed, 17 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f5d3b9f..956a4a6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -22,3 +22,11 @@ repos: hooks: - id: ruff args: ["--fix", "--show-fixes"] + + - repo: https://github.com/pre-commit/mirrors-mypy + rev: "v1.4.1" + hooks: + - id: mypy + files: ^(src) + additional_dependencies: + - Click diff --git a/pyproject.toml b/pyproject.toml index 9a65d20..0007ef9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -121,3 +121,12 @@ testpaths = ["tests"] [tool.coverage] run.source = ["src"] + +[tool.mypy] +strict = true +files = ["src"] +python_version = "3.9" +warn_unused_configs = true +show_error_codes = true +disallow_untyped_defs = false +follow_imports = "normal"