mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-12 08:42:18 +00:00
fix(a2a): type _scan's part parameter as _A2ATextPart, not dict[str, Any]
basedpyright's reportArgumentType flagged _scan (called with elements of Sequence[_A2ATextPart]) still typed to accept dict[str, Any], a stricter mismatch than the sibling _scan_input_part, which is called with real dict[str, Any] parts and had no such mismatch. Matching the real element type also clears 3 cascading reportUnknownArgumentType/ reportUnknownVariableType errors downstream of the call.
This commit is contained in:
parent
459efd00b9
commit
e4cd222fd9
1 changed files with 1 additions and 1 deletions
|
|
@ -444,7 +444,7 @@ class A2AGuardrailHandler(BaseTranslation):
|
|||
if depth >= max_depth:
|
||||
return ()
|
||||
|
||||
def _scan(part_idx: int, part: dict[str, Any]) -> tuple[tuple[str, tuple[str, ...], int, str], ...]:
|
||||
def _scan(part_idx: int, part: _A2ATextPart) -> tuple[tuple[str, tuple[str, ...], int, str], ...]:
|
||||
kind: Final = part.get("kind")
|
||||
if kind == "text":
|
||||
text: Final = part.get("text", "")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue