feat(mypy): add num_workers for parallel type checking#5831
Merged
madskristensen merged 1 commit intoJun 22, 2026
Conversation
Contributor
|
Thanks for the PR! This section of the codebase is owned by @madskristensen and |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #5826.
mypy 2.0 added experimental parallel type checking via the
num_workersconfig option (the--num-workers/-nCLI flag), but the schema'sadditionalProperties: falserejects it, so editors like Even Better TOML flagnum_workersas an unexpected property. This adds it to the global options block in partial-mypy.json. It's a global-only option, so it's intentionally not added to the per-module overrides section. The entry matches the existingverbositystyle (plain description, integer type, default 0) and I extended the existing mypy-01.toml positive test withnum_workers = 4rather than adding a new fixture.Worth flagging for maintainers: the schema looks broadly stale relative to mypy 2.0/2.1, since it was last generated before 2.0 shipped in May.
native_parserwas exposed in the same 2.0 release (python/mypy#21387) and is also missing here. I kept this PR scoped to the reported issue, but a fuller regeneration pass against the current docs would be worthwhile as a follow-up if someone wants to pick it up.Validation:
node cli.js check --schema-name=pyproject.jsonpasses, and prettier is clean on both files.