mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-28 06:48:50 +00:00
community[patch]: Resolve more linting issues (#26115)
Resolve a bunch of errors caught with mypy
This commit is contained in:
@@ -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:
|
||||
|
@@ -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
|
||||
|
||||
|
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user