mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-31 06:56:59 +00:00
fix(anthropic): use PEP 604 union to satisfy ruff strict-rule budget
sanitize_tool_use_ids_in_anthropic_messages's new model param used Optional[str], which trips ruff's UP045 (prefer str | None) and pushed the strict-rule budget over its ceiling in CI. Switch to str | None, matching the style already used elsewhere in this same file.
This commit is contained in:
parent
646ce42ed3
commit
ffbbda6021
1 changed files with 1 additions and 1 deletions
|
|
@ -1063,7 +1063,7 @@ def _sanitize_tool_use_id_content_block(block: Any, *, preserve_kimi_k2_ids: boo
|
|||
return block
|
||||
|
||||
|
||||
def sanitize_tool_use_ids_in_anthropic_messages(messages: list[Any], model: Optional[str] = None) -> list[Any]:
|
||||
def sanitize_tool_use_ids_in_anthropic_messages(messages: list[Any], model: str | None = None) -> list[Any]:
|
||||
"""
|
||||
Return a new message list with ``tool_use`` / ``server_tool_use`` ``id`` and
|
||||
``tool_result`` ``tool_use_id`` values rewritten to satisfy Anthropic's
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue