From aed1cd3283d9367c86f29536ba6b89966939ff3a Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Wed, 20 Nov 2024 05:17:27 +0530 Subject: [PATCH] fix: fix linting error --- litellm/main.py | 2 +- tests/local_testing/test_whisper.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/litellm/main.py b/litellm/main.py index 0afce3db5..f93eeeda9 100644 --- a/litellm/main.py +++ b/litellm/main.py @@ -4729,7 +4729,7 @@ def transcription( response_format: Optional[ Literal["json", "text", "srt", "verbose_json", "vtt"] ] = None, - timestamp_granularities: List[Literal["word", "segment"]] = None, + timestamp_granularities: Optional[List[Literal["word", "segment"]]] = None, temperature: Optional[int] = None, # openai defaults this to 0 ## LITELLM PARAMS ## user: Optional[str] = None, diff --git a/tests/local_testing/test_whisper.py b/tests/local_testing/test_whisper.py index 7d5d0d710..e2663a3ab 100644 --- a/tests/local_testing/test_whisper.py +++ b/tests/local_testing/test_whisper.py @@ -53,9 +53,11 @@ from litellm import Router ) @pytest.mark.parametrize("response_format", ["json", "vtt"]) @pytest.mark.parametrize("sync_mode", [True, False]) -@pytest.mark.parametrize("timestamp_granularities", [["word"], ["segment"]]) +@pytest.mark.parametrize("timestamp_granularities", [None, ["word"], ["segment"]]) @pytest.mark.asyncio -async def test_transcription(model, api_key, api_base, response_format, sync_mode, timestamp_granularities): +async def test_transcription( + model, api_key, api_base, response_format, sync_mode, timestamp_granularities +): if sync_mode: transcript = litellm.transcription( model=model,