From 027ba51ca53a36b7a0a8294e92bf642c2c8b0002 Mon Sep 17 00:00:00 2001 From: Sam Alghaithi Date: Sat, 29 Aug 2026 09:54:23 +0000 Subject: [PATCH] type the voice helpers with object instead of Any: their ANN401 budget counts it --- litellm/llms/gandr/text_to_speech/transformation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litellm/llms/gandr/text_to_speech/transformation.py b/litellm/llms/gandr/text_to_speech/transformation.py index a271e0abac6..e09fcbc51b1 100644 --- a/litellm/llms/gandr/text_to_speech/transformation.py +++ b/litellm/llms/gandr/text_to_speech/transformation.py @@ -33,7 +33,7 @@ else: HttpxBinaryResponseContent: TypeAlias = Any -def _resolve_voice(voice: Any) -> str | None: +def _resolve_voice(voice: object) -> str | None: """Return a voice id from a plain string or a voice-object mapping.""" if isinstance(voice, str) and voice.strip(): return voice @@ -45,7 +45,7 @@ def _resolve_voice(voice: Any) -> str | None: return None -def _as_voice_str(value: Any) -> str | None: +def _as_voice_str(value: object) -> str | None: """Return the value if it is a non-empty string, else None.""" if isinstance(value, str) and value.strip(): return value