mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-09 06:53:59 +00:00
community[patch]: upgrade to recent version of mypy (#21616)
This PR upgrades community to a recent version of mypy. It inserts type: ignore on all existing failures.
This commit is contained in:
@@ -13,7 +13,7 @@ xmltodict = pytest.importorskip("xmltodict")
|
||||
|
||||
@pytest.fixture
|
||||
def api_client() -> PubMedAPIWrapper:
|
||||
return PubMedAPIWrapper()
|
||||
return PubMedAPIWrapper() # type: ignore[call-arg]
|
||||
|
||||
|
||||
def test_run_success(api_client: PubMedAPIWrapper) -> None:
|
||||
@@ -115,7 +115,7 @@ def test_load_returns_no_result(api_client: PubMedAPIWrapper) -> None:
|
||||
def test_load_returns_limited_docs() -> None:
|
||||
"""Test that returns several docs"""
|
||||
expected_docs = 2
|
||||
api_client = PubMedAPIWrapper(top_k_results=expected_docs)
|
||||
api_client = PubMedAPIWrapper(top_k_results=expected_docs) # type: ignore[call-arg]
|
||||
docs = api_client.load_docs("ChatGPT")
|
||||
assert len(docs) == expected_docs
|
||||
assert_docs(docs)
|
||||
@@ -123,7 +123,7 @@ def test_load_returns_limited_docs() -> None:
|
||||
|
||||
def test_load_returns_full_set_of_metadata() -> None:
|
||||
"""Test that returns several docs"""
|
||||
api_client = PubMedAPIWrapper(load_max_docs=1, load_all_available_meta=True)
|
||||
api_client = PubMedAPIWrapper(load_max_docs=1, load_all_available_meta=True) # type: ignore[call-arg]
|
||||
docs = api_client.load_docs("ChatGPT")
|
||||
assert len(docs) == 3
|
||||
for doc in docs:
|
||||
|
Reference in New Issue
Block a user