From 733ccd6e0920252a99fdbe8a5bad892503026499 Mon Sep 17 00:00:00 2001 From: shivam Date: Fri, 17 Apr 2026 16:36:34 -0700 Subject: [PATCH] fixed linting --- litellm/proxy/middleware/prometheus_auth_middleware.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/litellm/proxy/middleware/prometheus_auth_middleware.py b/litellm/proxy/middleware/prometheus_auth_middleware.py index d0e38f98946..d5dec6c4bda 100644 --- a/litellm/proxy/middleware/prometheus_auth_middleware.py +++ b/litellm/proxy/middleware/prometheus_auth_middleware.py @@ -2,7 +2,7 @@ Prometheus Auth Middleware - Pure ASGI implementation """ import json -from typing import List +from typing import Any, List, MutableMapping from fastapi import Request from starlette.types import ASGIApp, Receive, Scope, Send @@ -43,9 +43,9 @@ class PrometheusAuthMiddleware: # user_api_key_auth reads the request body, which consumes ASGI `receive`. # Buffer those messages and replay them for the inner app; otherwise a # successful auth would forward an exhausted receive and /metrics hangs. - buffered_messages: List[dict] = [] + buffered_messages: List[MutableMapping[str, Any]] = [] - async def receive_for_auth() -> dict: + async def receive_for_auth() -> MutableMapping[str, Any]: message = await receive() buffered_messages.append(message) return message @@ -81,7 +81,7 @@ class PrometheusAuthMiddleware: replay_idx = 0 - async def receive_replay() -> dict: + async def receive_replay() -> MutableMapping[str, Any]: nonlocal replay_idx if replay_idx < len(buffered_messages): msg = buffered_messages[replay_idx]