mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-10 03:28:53 +00:00
fix(anthropic): drop Final on loop-locals in identity strip
Loop-bound Final declarations trip basedpyright's reportGeneralTypeIssues.
This commit is contained in:
parent
31569619c9
commit
2fc4f448b3
1 changed files with 2 additions and 2 deletions
|
|
@ -158,14 +158,14 @@ class AnthropicMessagesConfig(BaseAnthropicMessagesConfig):
|
|||
if content_type != "text":
|
||||
filtered_list.append(content_block)
|
||||
continue
|
||||
stripped_text: Final[str | None] = strip_claude_code_identity(text)
|
||||
stripped_text = strip_claude_code_identity(text)
|
||||
if stripped_text is None:
|
||||
continue
|
||||
# Only copy the block when the text changed.
|
||||
if stripped_text == text:
|
||||
filtered_list.append(content_block)
|
||||
else:
|
||||
rewritten: Final = {**content_block, "text": stripped_text} # mutable-ok: API message payload
|
||||
rewritten = {**content_block, "text": stripped_text} # mutable-ok: API message payload
|
||||
filtered_list.append(rewritten)
|
||||
else:
|
||||
# Keep non-dict items as-is
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue