Skip to content

Add parallelism to check/mypy - #1935

Open
mhucka wants to merge 4 commits into
quantumlib:mainfrom
mhucka:use-parallelism-with-mypy
Open

Add parallelism to check/mypy#1935
mhucka wants to merge 4 commits into
quantumlib:mainfrom
mhucka:use-parallelism-with-mypy

Conversation

@mhucka

@mhucka mhucka commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Make use of the -n flag that Mypy 2.0+ supports for parallel workers.

@mhucka
mhucka marked this pull request as ready for review August 11, 2026 16:08

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates the check/mypy script to run mypy in parallel using the -n flag when mypy version 2.0 or higher is detected. The feedback highlights a potential issue where os.cpu_count() could return None or 1, which would cause a TypeError or result in an invalid worker count of 0. A robust fallback mechanism is suggested to ensure a minimum of 1 worker.

Comment thread check/mypy Outdated
Per review comment by Gemini Code Assist.
@mhucka
mhucka requested review from fdmalone and mpharrigan August 11, 2026 17:51
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.

1 participant