fix: satisfy the LIT002 type-discipline gate for vertex_location_params

Each ternary branch now wraps its own dict literal in MappingProxyType,
so both count as an argument passed directly to a freezing wrapper
instead of a bare mutable-collection construction. Confirmed against
the actual checker: litellm/ scores identically to the merge base with
this change applied (26719 either way).

Signed-off-by: Ankit Jha <jhaankit373@gmail.com>
This commit is contained in:
Ankit Jha 2026-09-16 15:15:24 +05:30
parent b00c00e5f8
commit 674b95e121
No known key found for this signature in database

View file

@ -203,7 +203,9 @@ class GenerateContentHelper:
MappingProxyType(litellm_params.model_dump(exclude_none=True))
)
vertex_location_params: Final = (
{"vertex_location": explicit_vertex_location} if explicit_vertex_location else {}
MappingProxyType({"vertex_location": explicit_vertex_location})
if explicit_vertex_location
else MappingProxyType({})
)
litellm_logging_obj.update_from_kwargs(