From 9b15e0069b32b86b50c0d6606ccef4b873bc38ee Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Wed, 8 Jan 2020 16:07:10 +0100 Subject: [PATCH] More lightweight mypy pre-commit hook --- .pre-commit-config.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 809764a20a713..139b9e31df46c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -20,11 +20,11 @@ repos: rev: v0.730 hooks: - id: mypy - # We run mypy over all files because of: - # * changes in type definitions may affect non-touched files. - # * Running it with `mypy pandas` and the filenames will lead to - # spurious duplicate module errors, - # see also https://github.com/pre-commit/mirrors-mypy/issues/5 - pass_filenames: false args: - - pandas + # As long as a some files are excluded from check-untyped-defs + # we have to exclude it from the pre-commit hook as the configuration + # is based on modules but the hook runs on files. + - --no-check-untyped-defs + - --follow-imports + - skip + files: pandas/