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.
This commit is contained in:
rain 2026-09-23 18:24:52 +08:00 • committed by Rainmemery
parent 69f6634f3d
commit 9467f7e887

View file

@ -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: