mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-08 14:31:55 +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:
@@ -7,14 +7,14 @@ from langchain_community.llms.tongyi import Tongyi
|
||||
|
||||
def test_tongyi_call() -> None:
|
||||
"""Test valid call to tongyi."""
|
||||
llm = Tongyi()
|
||||
llm = Tongyi() # type: ignore[call-arg]
|
||||
output = llm.invoke("who are you")
|
||||
assert isinstance(output, str)
|
||||
|
||||
|
||||
def test_tongyi_generate() -> None:
|
||||
"""Test valid call to tongyi."""
|
||||
llm = Tongyi()
|
||||
llm = Tongyi() # type: ignore[call-arg]
|
||||
output = llm.generate(["who are you"])
|
||||
assert isinstance(output, LLMResult)
|
||||
assert isinstance(output.generations, list)
|
||||
@@ -22,7 +22,7 @@ def test_tongyi_generate() -> None:
|
||||
|
||||
def test_tongyi_generate_stream() -> None:
|
||||
"""Test valid call to tongyi."""
|
||||
llm = Tongyi(streaming=True)
|
||||
llm = Tongyi(streaming=True) # type: ignore[call-arg]
|
||||
output = llm.generate(["who are you"])
|
||||
print(output) # noqa: T201
|
||||
assert isinstance(output, LLMResult)
|
||||
|
Reference in New Issue
Block a user