fix: pin mypy target platform to linux in pyproject.toml - #4503
fix: pin mypy target platform to linux in pyproject.toml#4503thegoodengineer wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e1c92ad7d8
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| "tests/**/*.py" = ["ASYNC", "RUF006", "RUF012", "RUF100"] | ||
|
|
||
| [tool.mypy] | ||
| platform = "linux" |
There was a problem hiding this comment.
Preserve a Windows-targeted mypy pass
On native Windows, this makes make typecheck analyze every sys.platform branch as Linux instead of validating the supported Windows paths. Mypy's --help describes --platform as “Type check special-cased code for the given OS platform”; overriding it therefore hides the three Windows-only errors this change is intended to address, including the DockerSandboxClient temporary-file flow that the README explicitly recommends on Windows. Fix those errors or add a separate win32 mypy pass rather than making Windows contributors receive a passing result without checking Windows-specific code.
Useful? React with 👍 / 👎.
This pull request fixes make typecheck behavior on Windows contributor setups by pinning platform = linux in pyproject.toml.
Background
Running make typecheck or uv run mypy src on Windows previously surfaced 3 platform-specific type errors in src/agents/sandbox/ because mypy used the host OS (win32) instead of the target Linux platform enforced in CI (ubuntu-latest). Setting platform = linux ensures mypy output is deterministic across all OS environments.
This pull request resolves #4477.