From 3696a40f97916ffa34e256d3fabd79e634e408eb Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Wed, 19 Aug 2026 16:28:28 +0200 Subject: [PATCH] chore(types): delete five type: ignore comments that suppress nothing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mypy's warn_unused_ignores is on, so these were reported as errors in their own right — a suppression that no longer suppresses is a claim that something is broken when it is not, and it silently widens to cover a real error if one later appears on that line. Two carried a "Forward reference" note that is still accurate; the note is kept and only the ignore removed. 95 errors -> 90. Comment-only, so no runtime behaviour can have changed and the suite was not re-run for this commit. The `# type: ignore` count across the tree drops from 6 to 1, which is the anchor for the rest of this work: clearing a type error by suppressing it would push that number the other way. Co-Authored-By: Claude --- src/responses/schemas.py | 2 +- src/responses/streaming.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/responses/schemas.py b/src/responses/schemas.py index 5736b1b..1db5499 100644 --- a/src/responses/schemas.py +++ b/src/responses/schemas.py @@ -71,7 +71,7 @@ class FunctionCallOutputItem(CustomBaseModel): # Union type for all output items # Type: ignore because Pydantic handles union types specially -OutputItem = MessageOutputItem | ReasoningOutputItem | FunctionCallOutputItem # type: ignore +OutputItem = MessageOutputItem | ReasoningOutputItem | FunctionCallOutputItem # ============================================================================ diff --git a/src/responses/streaming.py b/src/responses/streaming.py index 85d62e2..fa167f8 100644 --- a/src/responses/streaming.py +++ b/src/responses/streaming.py @@ -137,7 +137,7 @@ class StreamingCoordinator: async def stream_response_with_steward( self, - request: "ResponseRequest", # type: ignore # Forward reference + request: "ResponseRequest", # Forward reference ) -> AsyncGenerator[StreamEvent, None]: """ Stream response with Steward preprocessing and two-phase Tatlock execution. @@ -282,8 +282,8 @@ class StreamingCoordinator: async def _stream_direct_delegation( self, user_message: str, - recommendation: "StewardRecommendation", # type: ignore - tracker: "ToolCallTracker", # type: ignore + recommendation: "StewardRecommendation", + tracker: "ToolCallTracker", conversation_id: str, conversation_history: list | None = None, results: dict | None = None, @@ -387,7 +387,7 @@ class StreamingCoordinator: async def stream_response( self, - request: "ResponseRequest", # type: ignore # Forward reference + request: "ResponseRequest", # Forward reference ) -> AsyncGenerator[StreamEvent, None]: """ Coordinate streaming from agent to SSE events.