From dd28c12c97c6fbeb78e22909a0c2f59744beb9c2 Mon Sep 17 00:00:00 2001 From: Ilya Konstantinov Date: Wed, 19 Apr 2023 11:34:16 -0400 Subject: [PATCH] Add mypy-self-check to pre-commit --- .pre-commit-config.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 566e31d77017..f929aac3601e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,3 +14,17 @@ repos: additional_dependencies: - flake8-bugbear==22.12.6 # must match test-requirements.txt - flake8-noqa==1.3.0 # must match test-requirements.txt + - repo: local + hooks: + - id: mypy-self-check-mypy + name: mypy self-check mypy(c) + language: system + entry: python -m mypy --config-file mypy_self_check.ini -p mypy -p mypyc + pass_filenames: false + files: ^(mypy|mypyc)/.+\.py$ + - id: mypy-self-check-misc + name: mypy self-check misc + language: system + entry: python -m mypy --config-file mypy_self_check.ini misc --exclude misc/fix_annotate.py --exclude misc/async_matrix.py --exclude misc/sync-typeshed.py + pass_filenames: false + files: ^(misc)/.+\.py$