chore: justify LIT002 stash dict with mutable-ok reason (gate delta)

This commit is contained in:
ege-arhan 2026-09-21 09:35:44 +00:00
parent 96f0ab22a7
commit 6f9c6143d6

View file

@ -88,7 +88,7 @@ class OpenAILikeAnthropicMessagesConfig(AnthropicMessagesConfig):
model the cost map does not know (see #40890). Pop them before the
base transform so no drop warning fires, restore afterwards.
"""
stashed: dict = {}
stashed: dict = {} # mutable-ok: transient pop/restore stash, never escapes the call
for _key in ("thinking", "output_config", "temperature"):
if _key in anthropic_messages_optional_request_params:
stashed[_key] = anthropic_messages_optional_request_params.pop(_key)