From 679b7633413cb3b165ca14a16377a9cf040c66ee Mon Sep 17 00:00:00 2001 From: Hugo Osvaldo Barrera Date: Sun, 27 Jun 2021 16:09:17 +0000 Subject: [PATCH 1/3] Mention that auto-fetching stubs is unsupported --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 992ec34..da874ad 100644 --- a/README.md +++ b/README.md @@ -37,3 +37,6 @@ dependencies) you may also find it useful to add the typed dependencies to - id: mypy additional_dependencies: [tokenize-rt==3.2.0] ``` + +Note that using the `--install-types` is problematic. Mutating the pre-commit +environment at runtime breaks cache and will break parallel builds. From 997646e3234c562202354a8b22c47dbaa3a1e110 Mon Sep 17 00:00:00 2001 From: Aaron Gokaslan Date: Mon, 4 Oct 2021 13:09:07 -0400 Subject: [PATCH 2/3] Add stubs to mypy checking --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 752f30f..1b031d8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,7 +15,7 @@ jobs: - run: pip install pre-commit-mirror-maker - run: git config --global user.name 'Github Actions' - run: git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com' - - run: pre-commit-mirror . --language=python --package-name=mypy --types=python --args=--ignore-missing-imports,--scripts-are-modules --require-serial + - run: pre-commit-mirror . --language=python --package-name=mypy --types-or=python --types-or=pyi --args=--ignore-missing-imports,--scripts-are-modules --require-serial - run: | git remote set-url origin https://x-access-token:$GH_TOKEN@github.com/$GITHUB_REPOSITORY git push origin HEAD:refs/heads/master --tags From 5cf22ccb774a8be8f47dfe4c1e8c4f177c608cbf Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Mon, 4 Oct 2021 19:59:24 -0400 Subject: [PATCH 3/3] Mirror: 0.910 --- .pre-commit-hooks.yaml | 3 ++- setup.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml index 6876c2f..c3821ac 100644 --- a/.pre-commit-hooks.yaml +++ b/.pre-commit-hooks.yaml @@ -2,7 +2,8 @@ name: mypy entry: mypy language: python - 'types': [python] + 'types_or': [python, pyi] args: ["--ignore-missing-imports", "--scripts-are-modules"] require_serial: true additional_dependencies: [] + minimum_pre_commit_version: 2.9.2 diff --git a/setup.py b/setup.py index d55970b..0862667 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( - name='pre_commit_dummy_package', + name='pre_commit_placeholder_package', version='0.0.0', install_requires=['mypy==0.910'], )