Skip to content

feat(mypy): add num_workers for parallel type checking#5831

Merged
madskristensen merged 1 commit into
SchemaStore:masterfrom
wasimat404:fix/5826-mypy-num-workers
Jun 22, 2026
Merged

feat(mypy): add num_workers for parallel type checking#5831
madskristensen merged 1 commit into
SchemaStore:masterfrom
wasimat404:fix/5826-mypy-num-workers

Conversation

@wasimat404

Copy link
Copy Markdown
Contributor

Closes #5826.

mypy 2.0 added experimental parallel type checking via the num_workers config option (the --num-workers / -n CLI flag), but the schema's additionalProperties: false rejects it, so editors like Even Better TOML flag num_workers as 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 existing verbosity style (plain description, integer type, default 0) and I extended the existing mypy-01.toml positive test with num_workers = 4 rather 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_parser was 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.json passes, and prettier is clean on both files.

@wasimat404 wasimat404 marked this pull request as ready for review June 20, 2026 20:03
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for the PR!

This section of the codebase is owned by @madskristensen and @hyperupcall - if they write a comment saying "LGTM" then it will be merged.

@madskristensen madskristensen merged commit 063f7f2 into SchemaStore:master Jun 22, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[mypy] add support for num_workers

2 participants