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:
叮当猫 2026-10-12 14:42:22 +08:00
parent 8e71fa5c63
commit 55f77ac709

View file

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