Skip to content

Commit

Permalink
Silenced some typing complaints
Browse files Browse the repository at this point in the history
  • Loading branch information
sveinbjornt committed Oct 25, 2024
1 parent ff2f63d commit cc3081f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ dev = [
"ruff>=0.5.7",
"pre-commit>=3.3.3",
"mypy>=1.4.1",
"boto3-stubs>=1.35.48",
]

# *** Configuration of tools ***
Expand Down
11 changes: 6 additions & 5 deletions tests/test_tts.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
from unittest.mock import MagicMock, patch

import pytest
from pydantic import SecretStr

from icespeak import TTSOptions, tts_to_file
from icespeak.settings import (
Expand Down Expand Up @@ -144,12 +145,12 @@ def test_OpenAI_speech_synthesis():
def test_keys_override_in_tts_to_file():
"""Test if keys_override is correctly passed into service.text_to_speech."""
_TEXT = "Test"
SERVICES["mock_service"].audio_formats = ["mp3"]
SERVICES["mock_service"].audio_formats = ["mp3"] # type: ignore
keys_override = Keys(
aws=AWSPollyKey(
aws_access_key_id="test",
aws_secret_access_key="test",
region_name="test",
aws_access_key_id=SecretStr("test"),
aws_secret_access_key=SecretStr("test"),
region_name=SecretStr("test"),
)
)
opts = TTSOptions(text_format=TextFormats.TEXT, audio_format="mp3", voice="Dora")
Expand All @@ -159,7 +160,7 @@ def test_keys_override_in_tts_to_file():
transcribe=False,
keys_override=keys_override,
)
SERVICES["mock_service"].text_to_speech.assert_called_once_with(
SERVICES["mock_service"].text_to_speech.assert_called_once_with( # type: ignore
_TEXT,
opts,
keys_override,
Expand Down

0 comments on commit cc3081f

Please sign in to comment.