community[patch]: Resolve more linting issues (#26115)

Resolve a bunch of errors caught with mypy
This commit is contained in:
Eugene Yurtsev
2024-09-05 15:59:30 -04:00
committed by GitHub
parent 6e1b0d0228
commit 0cc6584889
13 changed files with 43 additions and 47 deletions

View File

@@ -28,11 +28,11 @@ def amazon_retriever(
)
def test_create_client(amazon_retriever: AmazonKnowledgeBasesRetriever) -> None:
def test_create_client() -> None:
# Import error if boto3 is not installed
# Value error if credentials are not supplied.
with pytest.raises((ImportError, ValueError)):
amazon_retriever.create_client({})
AmazonKnowledgeBasesRetriever() # type: ignore
def test_standard_params(amazon_retriever: AmazonKnowledgeBasesRetriever) -> None:

View File

@@ -128,7 +128,7 @@ def test_init(asr: RivaASR) -> None:
"""Test that ASR accepts valid arguments."""
for key, expected_val in CONFIG.items():
if key == "url":
assert asr.url == AnyHttpUrl(expected_val)
assert asr.url == AnyHttpUrl(expected_val) # type: ignore
else:
assert getattr(asr, key, None) == expected_val

View File

@@ -58,7 +58,7 @@ def test_init(tts: RivaTTS) -> None:
"""Test that ASR accepts valid arguments."""
for key, expected_val in CONFIG.items():
if key == "url":
assert str(tts.url) == expected_val + "/"
assert str(tts.url) == expected_val + "/" # type: ignore
else:
assert getattr(tts, key, None) == expected_val