From bcef99aa7f367053a62dda3009dea42dce7ba597 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 26 Jan 2026 12:36:15 +0000 Subject: [PATCH 1/3] Remove --example-workers 0 only from mypy-docs hook This reverts the previous incorrect change that removed --example-workers 0 from all hooks, and correctly removes it only from mypy-docs. See https://github.com/python/mypy/issues/18283 --- .pre-commit-config.yaml | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9251b220..3218ba36 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -185,7 +185,8 @@ repos: - id: mypy-docs name: mypy-docs stages: [pre-push] - entry: uv run --extra=dev doccmd --no-write-to-file --language=python --command="mypy" + entry: uv run --extra=dev doccmd --no-write-to-file --language=python + --command="mypy" language: python types_or: [markdown, rst] @@ -209,7 +210,8 @@ repos: - id: pyright-docs name: pyright-docs stages: [pre-push] - entry: uv run --extra=dev doccmd --no-write-to-file --language=python --command="pyright" + entry: uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python + --command="pyright" language: python types_or: [markdown, rst] @@ -224,7 +226,8 @@ repos: - id: vulture-docs name: vulture docs - entry: uv run --extra=dev doccmd --no-write-to-file --language=python --command="vulture" + entry: uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python + --command="vulture" language: python types_or: [python] pass_filenames: false @@ -258,7 +261,8 @@ repos: - id: pylint-docs name: pylint-docs - entry: uv run --extra=dev doccmd --no-write-to-file --language=python --command="pylint" + entry: uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python + --command="pylint" language: python stages: [manual] types_or: [markdown, rst] @@ -298,7 +302,8 @@ repos: - id: interrogate-docs name: interrogate docs - entry: uv run --extra=dev doccmd --no-write-to-file --language=python --command="interrogate" + entry: uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python + --command="interrogate" language: python types_or: [markdown, rst] additional_dependencies: [uv==0.9.5] @@ -376,8 +381,8 @@ repos: - id: ty-docs name: ty-docs stages: [pre-push] - entry: uv run --extra=dev doccmd --no-write-to-file --language=python --command="ty - check" + entry: uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python + --command="ty check" language: python types_or: [markdown, rst] additional_dependencies: [uv==0.9.5] @@ -419,8 +424,8 @@ repos: - id: pyrefly-docs name: pyrefly-docs stages: [pre-push] - entry: uv run --extra=dev doccmd --no-write-to-file --language=python --command="pyrefly - check" + entry: uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=python + --command="pyrefly check" language: python types_or: [markdown, rst] additional_dependencies: [uv==0.9.5] From 2c4595dc11c7e8dd0113267b1ae243152a6e9f38 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Mon, 26 Jan 2026 12:37:46 +0000 Subject: [PATCH 2/3] [pre-commit.ci lite] apply automatic fixes --- .pre-commit-config.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3218ba36..eb47836c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -185,8 +185,7 @@ repos: - id: mypy-docs name: mypy-docs stages: [pre-push] - entry: uv run --extra=dev doccmd --no-write-to-file --language=python - --command="mypy" + entry: uv run --extra=dev doccmd --no-write-to-file --language=python --command="mypy" language: python types_or: [markdown, rst] From d03397b0e00795e3282b86c4e57cc282a8756738 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 26 Jan 2026 12:46:24 +0000 Subject: [PATCH 3/3] Add comment explaining why --example-workers 0 is not used for mypy-docs --- .pre-commit-config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index eb47836c..3b42c609 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -182,6 +182,7 @@ repos: pass_filenames: false additional_dependencies: [uv==0.9.5] + # We do not use --example-workers 0 due to https://github.com/python/mypy/issues/18283 - id: mypy-docs name: mypy-docs stages: [pre-push]