From a898add48e8ea66f0ecdf3132291c34e9faf8ebc Mon Sep 17 00:00:00 2001 From: Zijian Zhang <35801754+futrime@users.noreply.github.com> Date: Mon, 12 Oct 2026 23:02:36 +0800 Subject: [PATCH] build: check types as on Linux on every machine, as CI does 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 --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index d2c49d41..87e54f80 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -324,6 +324,9 @@ include = ["src", "tests"] exclude = ["tests/system/sample"] typeCheckingMode = "strict" pythonVersion = "3.12" +# As CI checks it, on any machine: the fences and the sandbox call what only Linux's `os` +# and `socket` have, catching the `AttributeError` elsewhere, which a check on a Mac refuses. +pythonPlatform = "Linux" venvPath = "." venv = ".venv" # The only checker here is pyright, so a suppression names a pyright rule.