mirror of
https://github.com/usestrix/strix.git
synced 2026-09-30 01:52:18 +00:00
`make type-check` ran mypy for whichever platform the developer happened to be on, and no workflow ran it at all, so nothing gated a merge on it. The practical effect was that `sys.platform == "win32"` branches were never type-checked by anyone, while a Windows contributor saw six errors that did not exist for anyone else. Add a workflow running mypy under --platform linux, darwin and win32. All three run on Linux because --platform is what selects the branches mypy resolves; three runner OSes would cost three times as much and each would still check whatever platform it happened to be. Making --platform win32 pass needed the two platform-specific spots to resolve under every target: - codex.py reached fcntl.flock directly, which does not exist on Windows. Resolve it once behind a `sys.platform != "win32"` guard, which mypy narrows under every --platform, with a no-op fallback. Behaviour is unchanged: the ImportError path it used to rely on only ever fired on Windows, which the guard now covers explicitly. - session_manager.py reached os.getuid/os.getgid. Wrap the existing Linux check in a platform guard so the attributes resolve, keeping the indirection through a local that the original comment explains. `# type: ignore[attr-defined]` was not an option: warn_unused_ignores would then flag it on the platforms where the attribute does exist. `make type-check` now runs the same three platforms as CI. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| build-release.yml | ||
| typecheck.yml | ||