From b7f4f531b3f88f58ffbed3d3adbcafa4614d5fa0 Mon Sep 17 00:00:00 2001 From: mateo-berri <277851410+mateo-berri@users.noreply.github.com> Date: Tue, 18 Aug 2026 19:57:24 -0700 Subject: [PATCH] test(router): type the acreate_file fallback test helpers --- .../test_litellm/router_utils/test_fallback_event_handlers.py | 3 ++- tests/test_litellm/test_router.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_litellm/router_utils/test_fallback_event_handlers.py b/tests/test_litellm/router_utils/test_fallback_event_handlers.py index 23e068ef708..24477248a8a 100644 --- a/tests/test_litellm/router_utils/test_fallback_event_handlers.py +++ b/tests/test_litellm/router_utils/test_fallback_event_handlers.py @@ -1,4 +1,5 @@ import json +from typing import NoReturn from unittest.mock import MagicMock, patch import httpx @@ -167,7 +168,7 @@ async def _acreate_batch(*args, **kwargs): raise AssertionError("only used for its __name__") -async def _acreate_file(*args, **kwargs): +async def _acreate_file(*args: object, **kwargs: object) -> NoReturn: raise AssertionError("only used for its __name__") diff --git a/tests/test_litellm/test_router.py b/tests/test_litellm/test_router.py index 01b288d651b..833e425a3f9 100644 --- a/tests/test_litellm/test_router.py +++ b/tests/test_litellm/test_router.py @@ -518,7 +518,7 @@ async def test_async_router_acreate_file_does_not_fall_back_across_model_groups( fallbacks=[{"azure-gpt": ["openai-gpt"]}], ) - def fail_azure(*args, **kwargs): + def fail_azure(*args: object, **kwargs: object) -> MagicMock: if kwargs.get("model") == "azure/my-azure-deployment": raise litellm.APIConnectionError( message="Connection error.",