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:
vovanphuc 2026-08-20 09:30:16 +07:00
parent 7871a9d2a3
commit 24e8619db5

View file

@ -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]]