Skip to content

fix: pin mypy target platform to linux in pyproject.toml - #4503

Closed
thegoodengineer wants to merge 1 commit into
openai:mainfrom
thegoodengineer:fix/pin-mypy-target-platform
Closed

fix: pin mypy target platform to linux in pyproject.toml#4503
thegoodengineer wants to merge 1 commit into
openai:mainfrom
thegoodengineer:fix/pin-mypy-target-platform

Conversation

@thegoodengineer

Copy link
Copy Markdown
Contributor

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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread pyproject.toml
"tests/**/*.py" = ["ASYNC", "RUF006", "RUF012", "RUF100"]

[tool.mypy]
platform = "linux"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@thegoodengineer

Copy link
Copy Markdown
Contributor Author

Closing as #4477 was resolved by #4499.

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.

make typecheck reports three errors on Windows and none on Linux

1 participant