mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-26 06:03:19 +00:00
fix(router): silence LIT001 on the two new mutable annotations
- async_get_available_deployment: keep the new '-> dict[str, Any]' return annotation on one line with a short '# mutable-ok:' reason so ruff formatting cannot detach the suppression (LIT013 would count it dead). - _track_deployment_metrics: narrow the new 'deployment' parameter to Mapping[str, Any] (read-only view; the method only reads the dict), removing the LIT001 mutable-collection annotation entirely. type_discipline_gate: OK (no LIT rule grew past merge-base); ruff format + check clean; basedpyright counts unchanged by this edit. Signed-off-by: apex-mochen <2756823972@qq.com>
This commit is contained in:
parent
8e71fa5c63
commit
55f77ac709
1 changed files with 2 additions and 2 deletions
|
|
@ -13792,7 +13792,7 @@ class Router:
|
|||
messages: list[dict[str, str]] | None = None,
|
||||
input: str | list | None = None,
|
||||
specific_deployment: bool | None = False,
|
||||
) -> dict[str, Any]:
|
||||
) -> dict[str, Any]: # mutable-ok: returns pass-through deployment map
|
||||
"""
|
||||
Async implementation of 'get_available_deployments'.
|
||||
|
||||
|
|
@ -15206,7 +15206,7 @@ class Router:
|
|||
return pass_through_deployments
|
||||
|
||||
def _track_deployment_metrics(
|
||||
self, deployment: dict[str, Any], parent_otel_span: Span | None, response: object | None = None
|
||||
self, deployment: Mapping[str, Any], parent_otel_span: Span | None, response: object | None = None
|
||||
):
|
||||
"""
|
||||
Tracks successful requests rpm usage.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue