mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-12 08:42:18 +00:00
fix(guardrail_translation): satisfy strict ruff ANN401 typing ceiling
This commit is contained in:
parent
40e48d5072
commit
065df9d7fb
1 changed files with 2 additions and 2 deletions
|
|
@ -2,7 +2,7 @@ from __future__ import annotations
|
|||
|
||||
import json
|
||||
from collections.abc import Callable, Iterator, Mapping, Sequence
|
||||
from typing import Any, Final, TypeVar, cast # noqa: TID251 # a rebuilt chat row has no typed constructor across roles
|
||||
from typing import Final, TypeVar, cast # noqa: TID251 # a rebuilt chat row has no typed constructor across roles
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, TypeAdapter, ValidationError
|
||||
|
||||
|
|
@ -319,7 +319,7 @@ def anthropic_tool_name(tool: object) -> str | None:
|
|||
return names[0] if names else None
|
||||
|
||||
|
||||
def extract_tool_from_addition_block(block: Mapping[str, Any] | Any) -> dict[str, Any] | None:
|
||||
def extract_tool_from_addition_block(block: object) -> dict[str, object] | None:
|
||||
"""Extract raw tool dict from an Anthropic tool_addition block."""
|
||||
if not isinstance(block, Mapping):
|
||||
return None
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue