-
Notifications
You must be signed in to change notification settings - Fork 1
Enable mypy parallel workers in pre-commit #2185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
7b70f40
f455ade
813c4c9
659b671
b43fa4d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
| 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" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Doc parallelization uses wrong flagMedium Severity The Reviewed by Cursor Bugbot for commit b43fa4d. Configure here. |
||
| language: python | ||
| types_or: [markdown, rst] | ||
| additional_dependencies: | ||
| - *uv_version | ||
|
|
||
| - id: check-manifest | ||
| name: check-manifest | ||
|
|
||


There was a problem hiding this comment.
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=4flag is a mypy 2.0 feature (parallel type checking), but the project pinsmypy[faster-cache]==1.20.2inpyproject.tomlanduv.lock. Sinceuv run --extra=dev -m mypyresolves to the locked 1.20.2 version, both themypyandmypy-docshooks 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)
.pre-commit-config.yaml#L196-L198Reviewed by Cursor Bugbot for commit f455ade. Configure here.