fix(policy_engine): move mutable-ok suppressions onto the flagged lines

This commit is contained in:
mateo-berri 2026-09-01 17:15:11 -07:00
parent ec677e5e74
commit 85fea1a675

View file

@ -989,12 +989,8 @@ class OpenAIChatCompletionsHandler(BaseTranslation):
return
await self._apply_guardrail_responses_to_output_streaming(
responses=responses_so_far,
guardrailed_texts=[
after for _choice_idx, after in changed
], # mutable-ok: the callee's signature predates this change and takes lists
task_mappings=[
(choice_idx, None) for choice_idx, _after in changed
], # mutable-ok: the callee's signature predates this change and takes lists
guardrailed_texts=[after for _choice_idx, after in changed], # mutable-ok: callee takes lists
task_mappings=[(choice_idx, None) for choice_idx, _after in changed], # mutable-ok: callee takes lists
)
async def _apply_guardrail_responses_to_output_streaming(