style: apply ruff check and format

Made sure all ruff checks pass and formatted all files.

ref: N25B-224
This commit is contained in:
2025-11-02 19:45:01 +01:00
parent 657c300bc7
commit 48c9746417
25 changed files with 199 additions and 143 deletions

View File

@@ -6,7 +6,7 @@ from control_backend.agents.transcription.speech_recognizer import OpenAIWhisper
def test_estimate_max_tokens():
"""Inputting one minute of audio, assuming 300 words per minute, expecting 400 tokens."""
audio = np.empty(shape=(60*16_000), dtype=np.float32)
audio = np.empty(shape=(60 * 16_000), dtype=np.float32)
actual = SpeechRecognizer._estimate_max_tokens(audio)
@@ -16,7 +16,7 @@ def test_estimate_max_tokens():
def test_get_decode_options():
"""Check whether the right decode options are given under different scenarios."""
audio = np.empty(shape=(60*16_000), dtype=np.float32)
audio = np.empty(shape=(60 * 16_000), dtype=np.float32)
# With the defaults, it should limit output length based on input size
recognizer = OpenAIWhisperSpeechRecognizer()