Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -184,20 +184,22 @@ repos:
- id: mypy
name: mypy
stages: [pre-push]
entry: uv run --extra=dev -m mypy
entry: uv run --extra=dev -m mypy --num-workers=4
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using mypy 2.0 flag with pinned 1.20.2 version

High Severity

The --num-workers=4 flag is a mypy 2.0 feature (parallel type checking), but the project pins mypy[faster-cache]==1.20.2 in pyproject.toml and uv.lock. Since uv run --extra=dev -m mypy resolves to the locked 1.20.2 version, both the mypy and mypy-docs hooks will fail with an unrecognized argument error. The mypy 1.20 release blog and release planning issue (#20726) confirm parallel type checking was planned exclusively for 2.0.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit f455ade. Configure here.

language: python
types_or: [python, toml]
pass_filenames: false
additional_dependencies:
- *uv_version

# 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]
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
--num-workers=4"
language: python
types_or: [markdown, rst]
additional_dependencies:
- *uv_version

- id: check-manifest
name: check-manifest
Expand Down
Loading