Repository navigation
build: check types as on Linux on every machine, as CI does - #383
Merged
Merged
Conversation
pyright on a Mac refused the calls the fences, the sandbox and the local environment make to what only Linux's `os` and `socket` have -- `pidfd_open`, `O_PATH`, `AF_NETLINK`, `sched_getaffinity` -- each caught where it is missing, so `pre-commit` failed on every macOS checkout while CI, on Linux, passed. `pythonPlatform = "Linux"` makes the check the same everywhere. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
On a macOS checkout,
uv run pre-commit run --all-filesfailed with 20 pyright errors incoganchor/fence/loopback.py,coganchor/linux/landlock.py,coganchor/linux/seccomp.pyandruntime/flowing/environing_local.py. They're all calls to what only Linux'sosandsockethave (pidfd_open,O_PATH,AF_NETLINK,sched_getaffinity), each guarded by anAttributeErrorhandler. CI'sstaticjob runs on Linux and passes, so every macOS contributor saw a red hook that CI never showed.[tool.pyright] pythonPlatform = "Linux"makes the check the same on every machine.Verification
uv run --frozen pyright→ 0 errors (was 20); the fullpre-commit run --all-filespasses.🤖 Generated with Claude Code