From 9467f7e887dc5b6d700a0430df438cb482e0d76e Mon Sep 17 00:00:00 2001 From: rain <1504569896@qq.com> Date: Wed, 23 Sep 2026 18:24:52 +0800 Subject: [PATCH] fix(responses bridge): suppress the correct pyright rule on output rebuild type_check_gate flagged a net +2 reportAttributeAccessIssue: the assignment response.output = streamed_items is an attribute-access error, but the ignore comments named reportAssignmentType, so nothing was suppressed. Correct the rule name on both call sites. --- .../litellm_responses_transformation/handler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litellm/completion_extras/litellm_responses_transformation/handler.py b/litellm/completion_extras/litellm_responses_transformation/handler.py index 151783d00aa..4984fcd1a0e 100644 --- a/litellm/completion_extras/litellm_responses_transformation/handler.py +++ b/litellm/completion_extras/litellm_responses_transformation/handler.py @@ -94,7 +94,7 @@ class ResponsesToCompletionBridgeHandler: if len(response.output) == 0 and callable(get_streamed_items): streamed_items: Final = get_streamed_items() if streamed_items: - response.output = streamed_items # pyright: ignore[reportAssignmentType] # streamed items are the typed SSE output items + response.output = streamed_items # pyright: ignore[reportAttributeAccessIssue] # assigning typed SSE items back to ResponsesAPIResponse.output return response async def _collect_response_from_stream_async(self, stream_iter: AsyncIterable[object]) -> "ResponsesAPIResponse": @@ -114,7 +114,7 @@ class ResponsesToCompletionBridgeHandler: if len(response.output) == 0 and callable(get_streamed_items): streamed_items: Final = get_streamed_items() if streamed_items: - response.output = streamed_items # pyright: ignore[reportAssignmentType] # streamed items are the typed SSE output items + response.output = streamed_items # pyright: ignore[reportAttributeAccessIssue] # assigning typed SSE items back to ResponsesAPIResponse.output return response def validate_input_kwargs(self, kwargs: dict) -> ResponsesToCompletionBridgeHandlerInputKwargs: