Skip to content

Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.

ci: repair mypy no-any-return in _win32_pid_alive (#1556 follow-up) (#2336)

Tejas Chopra4726c7343fcf
diff --git a/headroom/_subprocess.py b/headroom/_subprocess.py
index 938c9eebd..bddcbd59f 100644
--- a/headroom/_subprocess.py
+++ b/headroom/_subprocess.py
@@ -15,7 +15,8 @@ def _win32_pid_alive(pid: int) -> bool:
kernel32.CloseHandle(handle)
return True
ERROR_ACCESS_DENIED = 5
- return kernel32.GetLastError() == ERROR_ACCESS_DENIED
+ # ctypes GetLastError() is Any; wrap so mypy sees bool (matches pid_alive below).
+ return bool(kernel32.GetLastError() == ERROR_ACCESS_DENIED)
def pid_alive(pid: int) -> bool: