From d5ad71dd6584d9a942edf45a7fe0f346d3455440 Mon Sep 17 00:00:00 2001 From: mateo-berri <277851410+mateo-berri@users.noreply.github.com> Date: Sat, 7 Nov 2026 10:54:21 -0800 Subject: [PATCH] test(anthropic): type the retry helper parameter in the cancellation test --- tests/unit/test_main.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/unit/test_main.py b/tests/unit/test_main.py index 150f45e009d..c832da5dbfc 100644 --- a/tests/unit/test_main.py +++ b/tests/unit/test_main.py @@ -8,7 +8,7 @@ import logging import os import threading import urllib.parse -from collections.abc import Mapping +from collections.abc import Awaitable, Callable, Mapping from concurrent.futures import ThreadPoolExecutor from dataclasses import dataclass from datetime import datetime @@ -7938,7 +7938,9 @@ async def test_responses_with_retries(sync_mode): @pytest.mark.parametrize("retry_function", [acompletion_with_retries, aresponses_with_retries]) @pytest.mark.asyncio -async def test_async_retry_helpers_stop_when_the_call_is_cancelled(retry_function): +async def test_async_retry_helpers_stop_when_the_call_is_cancelled( + retry_function: Callable[..., Awaitable[object]], +) -> None: upstream: Final = AsyncMock(side_effect=[asyncio.CancelledError(), MagicMock()]) with pytest.raises(asyncio.CancelledError):