From 7430ff552500f6d14e0c40b149f446bc719473df Mon Sep 17 00:00:00 2001 From: snowman2 Date: Wed, 24 Nov 2021 11:14:02 -0600 Subject: [PATCH 1/2] REF: Make mypy nanual stage with pre-commit --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 474916cf1a1..c01ce52561d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -48,9 +48,9 @@ repos: rev: v0.931 hooks: - id: mypy - # `properies` & `asv_bench` are copied from setup.cfg. - # `_typed_ops.py` is added since otherwise mypy will complain (but notably only in pre-commit) - exclude: "properties|asv_bench|_typed_ops.py" + # Copied from setup.cfg + exclude: "properties|asv_bench" + stages: [manual] additional_dependencies: [ # Type stubs types-python-dateutil, From 646d15185b50bfd2528e115029295a5afa35ab17 Mon Sep 17 00:00:00 2001 From: "Alan D. Snow" Date: Wed, 24 Nov 2021 11:31:16 -0600 Subject: [PATCH 2/2] Update .pre-commit-config.yaml Co-authored-by: Maximilian Roos <5635139+max-sixty@users.noreply.github.com> --- .pre-commit-config.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c01ce52561d..5ac1d1e3c3d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -50,6 +50,8 @@ repos: - id: mypy # Copied from setup.cfg exclude: "properties|asv_bench" + # This is slow and so we take it out of the fast-path; requires passing + # `--hook-stage manual` to pre-commit stages: [manual] additional_dependencies: [ # Type stubs