test(alerting): type the _alerted helper

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
jesus 2026-09-14 22:47:04 +00:00
parent f9298d8979
commit bd9fdd77e9

View file

@ -13,7 +13,7 @@ from litellm.proxy.utils import PrismaClient, ProxyLogging
from litellm.types.guardrails import GuardrailEventHooks
from unittest.mock import MagicMock, patch
from unittest.mock import AsyncMock, MagicMock, patch
from litellm.proxy.utils import get_custom_url, join_paths
@ -1305,9 +1305,8 @@ class TestPostCallFailureHookLLMExceptionAlerting:
client errors must be excluded so a guardrail content-policy block never
pages on-call. 5xx proxy errors still alert."""
async def _alerted(self, exc):
async def _alerted(self, exc: Exception) -> AsyncMock:
import asyncio
from unittest.mock import AsyncMock
from litellm.proxy._types import AlertType, UserAPIKeyAuth