From 61d560ae17a5e2265037ad68e8ee013368b31050 Mon Sep 17 00:00:00 2001 From: Anton Agestam Date: Fri, 25 Nov 2022 10:52:48 +0100 Subject: [PATCH] chore: bump mypy, move config from pre-commit Bumps mypy to latest version, 0.991. Config for mypy is moved from the pre-commit hook definition to mypy.ini, and in addition `pretty = True` is set to show more human friendly error messages. --- .pre-commit-config.yaml | 7 +------ mypy.ini | 3 +++ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 373bee8a3..c2bbdcb5d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -25,16 +25,11 @@ repos: files: \.py$ - repo: https://github.com/pre-commit/mirrors-mypy - rev: v0.942 + rev: v0.991 hooks: - id: mypy name: Mypy Karapace pass_filenames: false - args: - - "--show-error-codes" - - "--ignore-missing-imports" - - "--package" - - "karapace" - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.1.0 diff --git a/mypy.ini b/mypy.ini index a0952b212..110632091 100644 --- a/mypy.ini +++ b/mypy.ini @@ -1,5 +1,8 @@ [mypy] python_version = 3.7 +packages = karapace +show_error_codes = True +pretty = True warn_redundant_casts = True ignore_errors = False disallow_untyped_defs = True