chore: drop UP045 (#33362)

Python 3.9 EOL
This commit is contained in:
Mason Daugherty
2025-10-08 21:17:53 -04:00
committed by GitHub
parent 0039b3b046
commit 31eeb50ce0
119 changed files with 1423 additions and 1504 deletions

View File

@@ -0,0 +1 @@
"""Exa integration tests."""

View File

@@ -1,3 +1,5 @@
"""Test that the integration tests compile."""
import pytest # type: ignore[import-not-found, import-not-found]

View File

@@ -1,9 +1,12 @@
"""Integration tests for Exa find similar tool."""
from langchain_exa import (
ExaFindSimilarResults, # type: ignore[import-not-found, import-not-found]
)
def test_similarity_tool() -> None:
"""Test that the Exa find similar tool works."""
tool = ExaFindSimilarResults()
res = tool.invoke(
{

View File

@@ -1,3 +1,5 @@
"""Integration tests for `ExaSearchRetriever`."""
from langchain_core.documents import (
Document, # type: ignore[import-not-found, import-not-found]
)
@@ -6,6 +8,7 @@ from langchain_exa import ExaSearchRetriever
def test_exa_retriever() -> None:
"""Test basic functionality of the `ExaSearchRetriever`."""
retriever = ExaSearchRetriever()
res = retriever.invoke("best time to visit japan")
print(res) # noqa: T201
@@ -15,6 +18,7 @@ def test_exa_retriever() -> None:
def test_exa_retriever_highlights() -> None:
"""Test highlights feature of the `ExaSearchRetriever`."""
retriever = ExaSearchRetriever(highlights=True)
res = retriever.invoke("best time to visit japan")
print(res) # noqa: T201
@@ -29,6 +33,7 @@ def test_exa_retriever_highlights() -> None:
def test_exa_retriever_advanced_features() -> None:
"""Test advanced features of the `ExaSearchRetriever`."""
retriever = ExaSearchRetriever(
k=3, text_contents_options={"max_characters": 1000}, summary=True, type="auto"
)

View File

@@ -1,9 +1,12 @@
"""Integration tests for Exa search tool."""
from langchain_exa import (
ExaSearchResults, # type: ignore[import-not-found, import-not-found]
)
def test_search_tool() -> None:
"""Test that the Exa search tool works."""
tool = ExaSearchResults()
res = tool.invoke({"query": "best time to visit japan", "num_results": 5})
print(res) # noqa: T201
@@ -11,6 +14,7 @@ def test_search_tool() -> None:
def test_search_tool_advanced_features() -> None:
"""Test advanced features of the Exa search tool."""
tool = ExaSearchResults()
res = tool.invoke(
{