mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-10 22:41:41 +00:00
fix(google_genai): annotate FunctionDeclaration.parameters as a read-only Mapping
The new TypedDict field tripped the LIT001 type-discipline budget by adding one more mutable collection annotation. Declare it as Mapping[str, object] instead, which is the read-only view the rule asks for, leaving the budget at its base total.
This commit is contained in:
parent
7871a9d2a3
commit
24e8619db5
1 changed files with 2 additions and 2 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import json
|
||||
from collections.abc import AsyncIterator, Iterator, Sequence
|
||||
from collections.abc import AsyncIterator, Iterator, Mapping, Sequence
|
||||
from typing import Any, Final, TypedDict, cast
|
||||
|
||||
from typing_extensions import ReadOnly
|
||||
|
|
@ -47,7 +47,7 @@ class _GenAIPart(TypedDict, total=False):
|
|||
class _GenAIFunctionDeclaration(TypedDict, total=False):
|
||||
name: ReadOnly[str]
|
||||
description: ReadOnly[str]
|
||||
parameters: ReadOnly[dict[str, object]]
|
||||
parameters: ReadOnly[Mapping[str, object]]
|
||||
parametersJsonSchema: ReadOnly[dict[str, object]]
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue