type the voice helpers with object instead of Any: their ANN401 budget counts it

This commit is contained in:
Sam Alghaithi 2026-08-29 09:54:23 +00:00
parent 2e29b5c75f
commit 027ba51ca5

View file

@ -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