chore(rust_bridge): suppress LIT002 on dicts handed to logging

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
Yujong Lee 2026-09-16 19:00:59 +00:00
parent 3fcefa82f2
commit e8d22b9d67
3 changed files with 7 additions and 5 deletions

View file

@ -37,7 +37,7 @@ def _build_document_from_upload(
)
return convert_file_document_to_url_document(
{
{ # mutable-ok: OCR file document TypedDict handed to the converter
"type": "file",
"file": file_content,
"mime_type": mime_type or "application/octet-stream",

View file

@ -880,7 +880,7 @@ def dispatch_named_failure(
kwargs={ # mutable-ok: logfire receives a private mutable copy
key: value for key, value in details.items() if key != "original_response"
}
| {"exception": exception},
| {"exception": exception}, # mutable-ok: merged into the private copy above
response_obj=None,
start_time=start_time,
end_time=end_time,

View file

@ -24,7 +24,7 @@ class OcrLoggingProtocol(Protocol):
def _redact(params: Mapping[str, object], secret_fields: Sequence[str]) -> dict[str, object]:
return {
return { # mutable-ok: update_from_kwargs takes dict
name: "****" if name in secret_fields else value
for name, value in params.items()
if name != "proxy_server_request"
@ -44,11 +44,13 @@ def update_logging(
kwargs=_redact(kwargs, secret_fields),
model=model,
optional_params=_redact(optional_params, secret_fields),
litellm_params={
litellm_params={ # mutable-ok: update_from_kwargs takes dict
"litellm_call_id": kwargs.get("litellm_call_id"),
"api_base": url,
**{name: kwargs[name] for name in ("logger_fn", "litellm_request_debug") if name in kwargs},
**{
name: kwargs[name] for name in ("logger_fn", "litellm_request_debug") if name in kwargs
}, # mutable-ok: splat into the dict above
**{ # mutable-ok: splat into the dict above
name: kwargs[name]
for name in CustomPricingLiteLLMParams.model_fields
if name in kwargs and kwargs[name] is not None