From fca94336d38c9c17963631787c51a4396d126b3c Mon Sep 17 00:00:00 2001 From: Jerens Lensun <54782057+jerensl@users.noreply.github.com> Date: Thu, 31 Jul 2025 18:25:02 +0800 Subject: [PATCH] mach: Add comment to ignore type on geteuid as it only available on unix (#38388) Currently pyrefly have an issues with top level assertion on platform gating, so we decide to ignore it for now. https://github.com/facebook/pyrefly/issues/795 Signed-off-by: Jerens Lensun --- python/servo/platform/linux.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/servo/platform/linux.py b/python/servo/platform/linux.py index da5023066f7..23bcb0b6ddb 100644 --- a/python/servo/platform/linux.py +++ b/python/servo/platform/linux.py @@ -286,13 +286,13 @@ class Linux(Base): return False def check_sudo() -> bool: - if os.geteuid() != 0: + if os.geteuid() != 0: # pyrefly: ignore[missing-attribute] if shutil.which("sudo") is None: return False return True def run_as_root(command: list[str], force: bool = False) -> int: - if os.geteuid() != 0: + if os.geteuid() != 0: # pyrefly: ignore[missing-attribute] command.insert(0, "sudo") if force: command.append("-y")