diff --git a/openhands_cli/acp_impl/events/token_streamer.py b/openhands_cli/acp_impl/events/token_streamer.py index 87c1d518..574abdc5 100644 --- a/openhands_cli/acp_impl/events/token_streamer.py +++ b/openhands_cli/acp_impl/events/token_streamer.py @@ -11,6 +11,7 @@ from __future__ import annotations import asyncio +from typing import Any from acp import ( Client, @@ -238,7 +239,7 @@ async def _send() -> None: else: self.loop.run_until_complete(_send()) - def _handle_tool_call_streaming(self, tool_call) -> None: + def _handle_tool_call_streaming(self, tool_call: Any) -> None: if not tool_call: return diff --git a/openhands_cli/acp_impl/test_utils.py b/openhands_cli/acp_impl/test_utils.py index 35d85d6b..231c5819 100644 --- a/openhands_cli/acp_impl/test_utils.py +++ b/openhands_cli/acp_impl/test_utils.py @@ -21,7 +21,7 @@ import select import subprocess import time -from typing import Any +from typing import IO, Any class UnbufferedJsonRpcReader: @@ -31,7 +31,7 @@ class UnbufferedJsonRpcReader: that can cause messages to get stuck in buffers. """ - def __init__(self, stdout) -> None: + def __init__(self, stdout: IO[bytes]) -> None: self.stdout = stdout self.buffer = b"" self.fd = stdout.fileno()