From fce3a97d981c50cb42a704de6f8b2f8d92aafb07 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 26 Jan 2026 12:40:25 +0000 Subject: [PATCH 1/3] Fix: 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 | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 49e946718..0126b809a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,8 +1,6 @@ --- fail_fast: true -# We do not use --example-workers 0 due to https://github.com/python/mypy/issues/18283 - # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks @@ -124,8 +122,8 @@ repos: - id: shellcheck-docs name: shellcheck-docs - entry: uv run --extra=dev doccmd --no-write-to-file --language=shell --language=console - --command="shellcheck --shell=bash" + entry: uv run --extra=dev doccmd --no-write-to-file --example-workers 0 --language=shell + --language=console --command="shellcheck --shell=bash" language: python types_or: [markdown, rst] additional_dependencies: [uv==0.9.5] @@ -160,7 +158,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] additional_dependencies: [uv==0.9.5] @@ -185,7 +184,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] additional_dependencies: [uv==0.9.5] @@ -201,7 +201,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: [markdown, rst] additional_dependencies: [uv==0.9.5] @@ -234,7 +235,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] @@ -291,7 +293,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] @@ -355,8 +358,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] @@ -398,8 +401,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 4a5ce8e7c7572ce6809784976f2cffdc3346aeef 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:42:29 +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 0126b809a..9bb1ad683 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -158,8 +158,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] additional_dependencies: [uv==0.9.5] From 2a9c9f60296dc392004d5d8fdbee2f2ed6d2d094 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 26 Jan 2026 12:46:08 +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 9bb1ad683..c64693b9d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -155,6 +155,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]