mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-11 08:38:24 +00:00
style(lint): use bare Final for hidden_params aliases to satisfy ruff format and LIT001
This commit is contained in:
parent
0ed318377b
commit
5d0de99c2d
1 changed files with 4 additions and 4 deletions
|
|
@ -122,9 +122,9 @@ class OpenAILikeChatConfig(OpenAIGPTConfig):
|
|||
returned_response: Final = ModelResponse(**response_json)
|
||||
set_provider_response_headers_in_hidden_params(returned_response, response.headers)
|
||||
|
||||
sh: Final[dict[str, object]] = model_response.hidden_params # mutable-ok: dict # pyright: ignore[reportUnknownMemberType, reportUnknownVariableType] # untyped
|
||||
dh: Final[dict[str, object]] = returned_response.hidden_params # mutable-ok: dict # pyright: ignore[reportUnknownMemberType, reportUnknownVariableType] # untyped
|
||||
for k, v in sh.items():
|
||||
sh: Final = model_response.hidden_params # pyright: ignore[reportUnknownMemberType, reportUnknownVariableType] # raw
|
||||
dh: Final = returned_response.hidden_params # pyright: ignore[reportUnknownMemberType, reportUnknownVariableType] # raw
|
||||
for k, v in sh.items(): # pyright: ignore[reportUnknownMemberType, reportUnknownVariableType] # raw
|
||||
if k not in dh:
|
||||
dh[k] = v
|
||||
|
||||
|
|
@ -166,7 +166,7 @@ class OpenAILikeChatConfig(OpenAIGPTConfig):
|
|||
litellm_params["custom_llm_provider"], # pyright: ignore[reportUnknownArgumentType] # untyped
|
||||
str,
|
||||
):
|
||||
mh: Final[dict[str, object]] = model_response.hidden_params # mutable-ok: dict # pyright: ignore[reportUnknownMemberType, reportUnknownVariableType] # untyped
|
||||
mh: Final = model_response.hidden_params # pyright: ignore[reportUnknownMemberType, reportUnknownVariableType] # raw
|
||||
if "custom_llm_provider" not in mh:
|
||||
mh["custom_llm_provider"] = litellm_params["custom_llm_provider"] # pyright: ignore[reportUnknownArgumentType] # untyped
|
||||
return OpenAILikeChatConfig._transform_response(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue