Skip to content

The agent engineering platform.

multiple: rely on asyncio_mode auto in tests (#27200)

Erick Friis92ae61bcc8b1
diff --git a/libs/community/tests/integration_tests/chat_models/test_litellm_router.py b/libs/community/tests/integration_tests/chat_models/test_litellm_router.py
index 7bbaddb162..23f60398d6 100644
--- a/libs/community/tests/integration_tests/chat_models/test_litellm_router.py
+++ b/libs/community/tests/integration_tests/chat_models/test_litellm_router.py
@@ -266,7 +266,6 @@ def test_litellm_router_streaming_callback(
fake_completion.check_inputs(expected_num_calls=1)
@pytest.mark.scheduled
async def test_async_litellm_router(
fake_completion: FakeCompletion, litellm_router: Any
@@ -295,7 +294,6 @@ async def test_async_litellm_router(
fake_completion.check_inputs(expected_num_calls=2)
@pytest.mark.scheduled
async def test_async_litellm_router_streaming(
fake_completion: FakeCompletion, litellm_router: Any
diff --git a/libs/community/tests/integration_tests/chat_models/test_qianfan_endpoint.py b/libs/community/tests/integration_tests/chat_models/test_qianfan_endpoint.py
index d286aca33b..6749090eb2 100644
--- a/libs/community/tests/integration_tests/chat_models/test_qianfan_endpoint.py
+++ b/libs/community/tests/integration_tests/chat_models/test_qianfan_endpoint.py
@@ -2,7 +2,6 @@
from typing import Any, cast
-import pytest
from langchain_core.callbacks import CallbackManager
from langchain_core.messages import (
AIMessage,
@@ -201,7 +200,6 @@ def test_stream() -> None:
assert len(list(res)) >= 1
async def test_async_invoke() -> None:
chat = QianfanChatEndpoint() # type: ignore[call-arg]
res = await chat.ainvoke([HumanMessage(content="Hello")])
@@ -209,7 +207,6 @@ async def test_async_invoke() -> None:
assert res.content != ""
async def test_async_generate() -> None:
"""Tests chat agenerate works."""
chat = QianfanChatEndpoint() # type: ignore[call-arg]
@@ -229,7 +226,6 @@ async def test_async_generate() -> None:
assert isinstance(generation.text, str)
async def test_async_stream() -> None:
chat = QianfanChatEndpoint(streaming=True) # type: ignore[call-arg]
async for token in chat.astream(
diff --git a/libs/community/tests/integration_tests/chat_models/test_yuan2.py b/libs/community/tests/integration_tests/chat_models/test_yuan2.py
index 5499e0919b..bbe18d75cf 100644
--- a/libs/community/tests/integration_tests/chat_models/test_yuan2.py
+++ b/libs/community/tests/integration_tests/chat_models/test_yuan2.py
@@ -100,7 +100,6 @@ def test_chat_yuan2_streaming() -> None:
assert isinstance(response, BaseMessage)
async def test_async_chat_yuan2() -> None:
"""Test async generation."""
chat = ChatYuan2( # type: ignore[call-arg]
@@ -124,7 +123,6 @@ async def test_async_chat_yuan2() -> None:
assert generation.text == generation.message.content
async def test_async_chat_yuan2_streaming() -> None:
"""Test that streaming correctly invokes on_llm_new_token callback."""
callback_handler = FakeCallbackHandler()
diff --git a/libs/community/tests/integration_tests/indexes/test_document_manager.py b/libs/community/tests/integration_tests/indexes/test_document_manager.py
index f9d88d8398..b2b99b449c 100644
--- a/libs/community/tests/integration_tests/indexes/test_document_manager.py
+++ b/libs/community/tests/integration_tests/indexes/test_document_manager.py
@@ -43,7 +43,6 @@ def test_update(manager: MongoDocumentManager) -> None:
assert sorted(all_keys) == sorted(read_keys + updated_keys)
@pytest.mark.requires("motor")
async def test_aupdate(amanager: MongoDocumentManager) -> None:
"""Test updating records in the MongoDB."""
diff --git a/libs/community/tests/integration_tests/llms/test_vertexai.py b/libs/community/tests/integration_tests/llms/test_vertexai.py
index 613e63d3d7..598af7abc1 100644
--- a/libs/community/tests/integration_tests/llms/test_vertexai.py
+++ b/libs/community/tests/integration_tests/llms/test_vertexai.py
@@ -150,7 +150,6 @@ def test_model_garden_generate(
assert len(output.generations) == 2
@pytest.mark.parametrize(
"endpoint_os_variable_name,result_arg",
[("FALCON_ENDPOINT_ID", "generated_text"), ("LLAMA_ENDPOINT_ID", None)],
diff --git a/libs/community/tests/integration_tests/retrievers/test_contextual_compression.py b/libs/community/tests/integration_tests/retrievers/test_contextual_compression.py
index fb643a81c2..ae8acca430 100644
--- a/libs/community/tests/integration_tests/retrievers/test_contextual_compression.py
+++ b/libs/community/tests/integration_tests/retrievers/test_contextual_compression.py
@@ -1,4 +1,3 @@
-import pytest
from langchain.retrievers.contextual_compression import ContextualCompressionRetriever
from langchain.retrievers.document_compressors import EmbeddingsFilter
@@ -27,7 +26,6 @@ def test_contextual_compression_retriever_get_relevant_docs() -> None:
assert texts[-1] not in [d.page_content for d in actual]
async def test_acontextual_compression_retriever_get_relevant_docs() -> None:
"""Test get_relevant_docs."""
texts = [
diff --git a/libs/community/tests/integration_tests/storage/test_sql.py b/libs/community/tests/integration_tests/storage/test_sql.py
index a454029b86..a9eac4a500 100644
--- a/libs/community/tests/integration_tests/storage/test_sql.py
+++ b/libs/community/tests/integration_tests/storage/test_sql.py
@@ -45,7 +45,6 @@ def test_mget(sql_engine: Engine) -> None:
assert result == [b"value1", b"value2"]
async def test_amget(sql_aengine: AsyncEngine) -> None:
"""Test mget method."""
store = SQLStore(engine=sql_aengine, namespace="test")
@@ -85,7 +84,6 @@ def test_mset(sql_engine: Engine) -> None:
session.commit()
async def test_amset(sql_aengine: AsyncEngine) -> None:
"""Test that multiple keys can be set."""
store = SQLStore(engine=sql_aengine, namespace="test")
@@ -131,7 +129,6 @@ def test_mdelete(sql_engine: Engine) -> None:
session.commit()
async def test_amdelete(sql_aengine: AsyncEngine) -> None:
"""Test that deletion works as expected."""
store = SQLStore(engine=sql_aengine, namespace="test")
@@ -172,7 +169,6 @@ def test_yield_keys(sql_engine: Engine) -> None:
assert sorted(store.yield_keys(prefix="lang")) == []
async def test_ayield_keys(sql_aengine: AsyncEngine) -> None:
store = SQLStore(engine=sql_aengine, namespace="test")
await store.acreate_schema()
diff --git a/libs/community/tests/integration_tests/vectorstores/test_upstash.py b/libs/community/tests/integration_tests/vectorstores/test_upstash.py
index 7da52dd8b7..148db72fb3 100644
--- a/libs/community/tests/integration_tests/vectorstores/test_upstash.py
+++ b/libs/community/tests/integration_tests/vectorstores/test_upstash.py
@@ -68,7 +68,6 @@ def test_upstash_simple_insert() -> None:
@pytest.mark.vcr()
async def test_upstash_simple_insert_async() -> None:
"""Test end to end construction and search."""
texts = ["foo", "bar", "baz"]
@@ -94,7 +93,6 @@ def test_upstash_with_metadatas() -> None:
@pytest.mark.vcr()
async def test_upstash_with_metadatas_async() -> None:
"""Test end to end construction and search."""
texts = ["foo", "bar", "baz"]
@@ -125,7 +123,6 @@ def test_upstash_with_metadatas_with_scores() -> None:
@pytest.mark.vcr()
async def test_upstash_with_metadatas_with_scores_async() -> None:
"""Test end to end construction and scored search."""
texts = ["foo", "bar", "baz"]
@@ -159,7 +156,6 @@ def test_upstash_with_metadatas_with_scores_using_vector() -> None:
@pytest.mark.vcr()
async def test_upstash_with_metadatas_with_scores_using_vector_async() -> None:
"""Test end to end construction and scored search, using embedding vector."""
texts = ["foo", "bar", "baz"]
@@ -190,7 +186,6 @@ def test_upstash_mmr() -> None:
@pytest.mark.vcr()
async def test_upstash_mmr_async() -> None:
"""Test end to end construction and search."""
texts = ["foo", "bar", "baz"]
@@ -213,7 +208,6 @@ def test_upstash_mmr_by_vector() -> None:
@pytest.mark.vcr()
async def test_upstash_mmr_by_vector_async() -> None:
"""Test end to end construction and search."""
texts = ["foo", "bar", "baz"]
@@ -237,7 +231,6 @@ def test_init_from_index() -> None:
@pytest.mark.vcr()
async def test_init_from_async_index() -> None:
from upstash_vector import AsyncIndex
@@ -259,7 +252,6 @@ def test_init_from_credentials() -> None:
@pytest.mark.vcr()
async def test_init_from_credentials_async() -> None:
store = UpstashVectorStore(
index_url=os.environ["UPSTASH_VECTOR_REST_URL"],
@@ -326,7 +318,6 @@ def test_upstash_similarity_search_with_metadata() -> None:
@pytest.mark.vcr()
async def test_upstash_similarity_search_with_metadata_async() -> None:
store = UpstashVectorStore(embedding=FakeEmbeddings())
docs = [
@@ -384,7 +375,6 @@ def test_upstash_similarity_search_by_vector_with_metadata() -> None:
@pytest.mark.vcr()
async def test_upstash_similarity_search_by_vector_with_metadata_async() -> None:
store = UpstashVectorStore(embedding=FakeEmbeddings())
docs = [
@@ -434,7 +424,6 @@ def test_upstash_max_marginal_relevance_search_with_metadata() -> None:
@pytest.mark.vcr()
async def test_upstash_max_marginal_relevance_search_with_metadata_async() -> None:
store = UpstashVectorStore(embedding=FakeEmbeddings())
docs = [
@@ -539,7 +528,6 @@ def test_embedding_index() -> None:
@pytest.mark.vcr()
async def test_embedding_index_async() -> None:
store = UpstashVectorStore(
index_url=os.environ["UPSTASH_VECTOR_URL_EMBEDDING"],
diff --git a/libs/community/tests/unit_tests/embeddings/test_infinity_local.py b/libs/community/tests/unit_tests/embeddings/test_infinity_local.py
index 9d58307b95..b6eadfbc87 100644
--- a/libs/community/tests/unit_tests/embeddings/test_infinity_local.py
+++ b/libs/community/tests/unit_tests/embeddings/test_infinity_local.py
@@ -13,7 +13,6 @@ except ImportError:
@pytest.mark.skipif(not IMPORTED_TORCH, reason="torch not installed")
async def test_local_infinity_embeddings() -> None:
embedder = InfinityEmbeddingsLocal(
model="TaylorAI/bge-micro-v2",
diff --git a/libs/community/tests/unit_tests/llms/test_bedrock.py b/libs/community/tests/unit_tests/llms/test_bedrock.py
index 42af3a0112..bb64f4d29d 100644
--- a/libs/community/tests/unit_tests/llms/test_bedrock.py
+++ b/libs/community/tests/unit_tests/llms/test_bedrock.py
@@ -273,7 +273,6 @@ async def async_gen_mock_streaming_response() -> AsyncGenerator[Dict, None]:
yield item
async def test_bedrock_async_streaming_call() -> None:
# Mock boto3 import
mock_boto3 = MagicMock()
diff --git a/libs/community/tests/unit_tests/retrievers/test_you.py b/libs/community/tests/unit_tests/retrievers/test_you.py
index 2118fb0c90..a5a189d769 100644
--- a/libs/community/tests/unit_tests/retrievers/test_you.py
+++ b/libs/community/tests/unit_tests/retrievers/test_you.py
@@ -1,6 +1,5 @@
from unittest.mock import AsyncMock, patch
-import pytest
import responses
from langchain_community.retrievers.you import YouRetriever
@@ -63,7 +62,6 @@ class TestYouRetriever:
expected_result = NEWS_RESPONSE_PARSED
assert results == expected_result
- @pytest.mark.asyncio
async def test_ainvoke(self) -> None:
instance = YouRetriever(ydc_api_key="test_api_key")
diff --git a/libs/community/tests/unit_tests/tools/test_you.py b/libs/community/tests/unit_tests/tools/test_you.py
index 08caf91077..4c383a98d5 100644
--- a/libs/community/tests/unit_tests/tools/test_you.py
+++ b/libs/community/tests/unit_tests/tools/test_you.py
@@ -1,6 +1,5 @@
from unittest.mock import AsyncMock, patch
-import pytest
import responses
from langchain_community.tools.you import YouSearchTool
@@ -68,7 +67,6 @@ class TestYouSearchTool:
expected_result = NEWS_RESPONSE_PARSED
assert results == expected_result
- @pytest.mark.asyncio
async def test_ainvoke(self) -> None:
you_tool = YouSearchTool(api_wrapper=YouSearchAPIWrapper(ydc_api_key="test")) # type: ignore[call-arg]
diff --git a/libs/community/tests/unit_tests/utilities/test_you.py b/libs/community/tests/unit_tests/utilities/test_you.py
index 5ac5009d22..ef6d972f62 100644
--- a/libs/community/tests/unit_tests/utilities/test_you.py
+++ b/libs/community/tests/unit_tests/utilities/test_you.py
@@ -1,7 +1,6 @@
from typing import Any, Dict, List, Optional, Union
from unittest.mock import AsyncMock, patch
-import pytest
import responses
from langchain_core.documents import Document
@@ -189,7 +188,6 @@ def test_results_news() -> None:
assert raw_results == expected_result
async def test_raw_results_async() -> None:
instance = YouSearchAPIWrapper(ydc_api_key="test_api_key")
@@ -208,7 +206,6 @@ async def test_raw_results_async() -> None:
assert results == MOCK_RESPONSE_RAW
async def test_results_async() -> None:
instance = YouSearchAPIWrapper(ydc_api_key="test_api_key")
@@ -227,7 +224,6 @@ async def test_results_async() -> None:
assert results == MOCK_PARSED_OUTPUT
async def test_results_news_async() -> None:
instance = YouSearchAPIWrapper(endpoint_type="news", ydc_api_key="test_api_key")
diff --git a/libs/core/pyproject.toml b/libs/core/pyproject.toml
index 54e1f2b3c2..55682bff99 100644
--- a/libs/core/pyproject.toml
+++ b/libs/core/pyproject.toml
@@ -1,5 +1,5 @@
[build-system]
-requires = [ "poetry-core>=1.0.0",]
+requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.poetry]
@@ -12,10 +12,16 @@ readme = "README.md"
repository = "https://github.com/langchain-ai/langchain"
[tool.mypy]
-exclude = [ "notebooks", "examples", "example_data", "langchain_core/pydantic", "tests/unit_tests/utils/test_function_calling.py",]
+exclude = [
+ "notebooks",
+ "examples",
+ "example_data",
+ "langchain_core/pydantic",
+ "tests/unit_tests/utils/test_function_calling.py",
+]
disallow_untyped_defs = "True"
[[tool.mypy.overrides]]
-module = [ "numpy", "pytest",]
+module = ["numpy", "pytest"]
ignore_missing_imports = true
[tool.ruff]
@@ -73,22 +79,27 @@ select = [
"TID",
"UP",
"W",
- "YTT"
+ "YTT",
]
ignore = [
"COM812", # Messes with the formatter
- "UP007", # Incompatible with pydantic + Python 3.9
- "W293", #
+ "UP007", # Incompatible with pydantic + Python 3.9
+ "W293", #
]
[tool.coverage.run]
-omit = [ "tests/*",]
+omit = ["tests/*"]
[tool.pytest.ini_options]
addopts = "--snapshot-warn-unused --strict-markers --strict-config --durations=5"
-markers = [ "requires: mark tests as requiring a specific library", "asyncio: mark tests as requiring asyncio", "compile: mark placeholder test used to compile integration tests without running them",]
+markers = [
+ "requires: mark tests as requiring a specific library",
+ "compile: mark placeholder test used to compile integration tests without running them",
+]
asyncio_mode = "auto"
-filterwarnings = [ "ignore::langchain_core._api.beta_decorator.LangChainBetaWarning",]
+filterwarnings = [
+ "ignore::langchain_core._api.beta_decorator.LangChainBetaWarning",
+]
[tool.poetry.group.lint]
optional = true
@@ -106,12 +117,17 @@ optional = true
optional = true
[tool.ruff.lint.pep8-naming]
-classmethod-decorators = [ "classmethod", "langchain_core.utils.pydantic.pre_init", "pydantic.field_validator", "pydantic.v1.root_validator",]
+classmethod-decorators = [
+ "classmethod",
+ "langchain_core.utils.pydantic.pre_init",
+ "pydantic.field_validator",
+ "pydantic.v1.root_validator",
+]
[tool.ruff.lint.per-file-ignores]
-"tests/unit_tests/prompts/test_chat.py" = [ "E501",]
-"tests/unit_tests/runnables/test_runnable.py" = [ "E501",]
-"tests/unit_tests/runnables/test_graph.py" = [ "E501",]
+"tests/unit_tests/prompts/test_chat.py" = ["E501"]
+"tests/unit_tests/runnables/test_runnable.py" = ["E501"]
+"tests/unit_tests/runnables/test_graph.py" = ["E501"]
[tool.poetry.group.lint.dependencies]
ruff = "^0.5"
diff --git a/libs/core/tests/unit_tests/_api/test_beta_decorator.py b/libs/core/tests/unit_tests/_api/test_beta_decorator.py
index 40465813d2..55f5cc8025 100644
--- a/libs/core/tests/unit_tests/_api/test_beta_decorator.py
+++ b/libs/core/tests/unit_tests/_api/test_beta_decorator.py
@@ -118,7 +118,6 @@ def test_beta_function() -> None:
assert not inspect.iscoroutinefunction(beta_function)
async def test_beta_async_function() -> None:
"""Test beta async function."""
with warnings.catch_warnings(record=True) as warning_list:
@@ -159,7 +158,6 @@ def test_beta_method() -> None:
assert not inspect.iscoroutinefunction(obj.beta_method)
async def test_beta_async_method() -> None:
"""Test beta method."""
with warnings.catch_warnings(record=True) as warning_list:
diff --git a/libs/core/tests/unit_tests/_api/test_deprecation.py b/libs/core/tests/unit_tests/_api/test_deprecation.py
index 06ffa55a8d..a6a35430de 100644
--- a/libs/core/tests/unit_tests/_api/test_deprecation.py
+++ b/libs/core/tests/unit_tests/_api/test_deprecation.py
@@ -137,7 +137,6 @@ def test_deprecated_function() -> None:
assert not inspect.iscoroutinefunction(deprecated_function)
async def test_deprecated_async_function() -> None:
"""Test deprecated async function."""
with warnings.catch_warnings(record=True) as warning_list:
@@ -179,7 +178,6 @@ def test_deprecated_method() -> None:
assert not inspect.iscoroutinefunction(obj.deprecated_method)
async def test_deprecated_async_method() -> None:
"""Test deprecated async method."""
with warnings.catch_warnings(record=True) as warning_list:
diff --git a/libs/partners/anthropic/pyproject.toml b/libs/partners/anthropic/pyproject.toml
index 12bec1e3ae..83e32dbb03 100644
--- a/libs/partners/anthropic/pyproject.toml
+++ b/libs/partners/anthropic/pyproject.toml
@@ -1,5 +1,5 @@
[build-system]
-requires = [ "poetry-core>=1.0.0",]
+requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.poetry]
@@ -25,14 +25,17 @@ langchain-core = "^0.3.9"
pydantic = "^2.7.4"
[tool.ruff.lint]
-select = [ "E", "F", "I", "T201",]
+select = ["E", "F", "I", "T201"]
[tool.coverage.run]
-omit = [ "tests/*",]
+omit = ["tests/*"]
[tool.pytest.ini_options]
addopts = "--snapshot-warn-unused --strict-markers --strict-config --durations=5"
-markers = [ "requires: mark tests as requiring a specific library", "asyncio: mark tests as requiring asyncio", "compile: mark placeholder test used to compile integration tests without running them",]
+markers = [
+ "requires: mark tests as requiring a specific library",
+ "compile: mark placeholder test used to compile integration tests without running them",
+]
asyncio_mode = "auto"
[tool.poetry.dependencies.defusedxml]
diff --git a/libs/partners/azure-dynamic-sessions/pyproject.toml b/libs/partners/azure-dynamic-sessions/pyproject.toml
index 9a2407fb9b..4bd203f06b 100644
--- a/libs/partners/azure-dynamic-sessions/pyproject.toml
+++ b/libs/partners/azure-dynamic-sessions/pyproject.toml
@@ -34,7 +34,6 @@ omit = ["tests/*"]
addopts = "--snapshot-warn-unused --strict-markers --strict-config --durations=5"
markers = [
"requires: mark tests as requiring a specific library",
- "asyncio: mark tests as requiring asyncio",
"compile: mark placeholder test used to compile integration tests without running them",
]
asyncio_mode = "auto"
diff --git a/libs/partners/chroma/pyproject.toml b/libs/partners/chroma/pyproject.toml
index 463931fe50..fdde6826a4 100644
--- a/libs/partners/chroma/pyproject.toml
+++ b/libs/partners/chroma/pyproject.toml
@@ -1,5 +1,5 @@
[build-system]
-requires = [ "poetry-core>=1.0.0",]
+requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.poetry]
@@ -37,14 +37,18 @@ version = "^1.26.0"
python = ">=3.12"
[tool.ruff.lint]
-select = [ "E", "F", "I", "T201", "D",]
+select = ["E", "F", "I", "T201", "D"]
[tool.coverage.run]
-omit = [ "tests/*",]
+omit = ["tests/*"]
[tool.pytest.ini_options]
addopts = " --strict-markers --strict-config --durations=5"
-markers = [ "requires: mark tests as requiring a specific library", "asyncio: mark tests as requiring asyncio", "compile: mark placeholder test used to compile integration tests without running them",]
+markers = [
+ "requires: mark tests as requiring a specific library",
+ "compile: mark placeholder test used to compile integration tests without running them",
+]
+asyncio_mode = "auto"
[tool.poetry.dependencies.chromadb]
version = ">=0.4.0,<0.6.0,!=0.5.4,!=0.5.5,!=0.5.7,!=0.5.9,!=0.5.10,!=0.5.11,!=0.5.12"
@@ -72,7 +76,7 @@ optional = true
convention = "google"
[tool.ruff.lint.per-file-ignores]
-"tests/**" = [ "D",]
+"tests/**" = ["D"]
[tool.poetry.group.test.dependencies]
pytest = "^7.3.0"
@@ -119,4 +123,3 @@ python = ">=3.9"
[[tool.poetry.group.typing.dependencies.langchain-core]]
version = ">=0.1.40,<0.3"
python = "<3.9"
-
diff --git a/libs/partners/exa/pyproject.toml b/libs/partners/exa/pyproject.toml
index 399a2d9ead..6f8ecececd 100644
--- a/libs/partners/exa/pyproject.toml
+++ b/libs/partners/exa/pyproject.toml
@@ -33,7 +33,6 @@ omit = ["tests/*"]
addopts = "--snapshot-warn-unused --strict-markers --strict-config --durations=5"
markers = [
"requires: mark tests as requiring a specific library",
- "asyncio: mark tests as requiring asyncio",
"compile: mark placeholder test used to compile integration tests without running them",
]
asyncio_mode = "auto"
diff --git a/libs/partners/fireworks/pyproject.toml b/libs/partners/fireworks/pyproject.toml
index dd44828ff5..e8889cc2a2 100644
--- a/libs/partners/fireworks/pyproject.toml
+++ b/libs/partners/fireworks/pyproject.toml
@@ -1,5 +1,5 @@
[build-system]
-requires = [ "poetry-core>=1.0.0",]
+requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.poetry]
@@ -27,14 +27,17 @@ requests = "^2"
aiohttp = "^3.9.1"
[tool.ruff.lint]
-select = [ "E", "F", "I", "T201",]
+select = ["E", "F", "I", "T201"]
[tool.coverage.run]
-omit = [ "tests/*",]
+omit = ["tests/*"]
[tool.pytest.ini_options]
addopts = "--snapshot-warn-unused --strict-markers --strict-config --durations=5"
-markers = [ "requires: mark tests as requiring a specific library", "asyncio: mark tests as requiring asyncio", "compile: mark placeholder test used to compile integration tests without running them",]
+markers = [
+ "requires: mark tests as requiring a specific library",
+ "compile: mark placeholder test used to compile integration tests without running them",
+]
asyncio_mode = "auto"
[tool.poetry.group.test]
diff --git a/libs/partners/huggingface/pyproject.toml b/libs/partners/huggingface/pyproject.toml
index 53c0dc204f..429edb95b2 100644
--- a/libs/partners/huggingface/pyproject.toml
+++ b/libs/partners/huggingface/pyproject.toml
@@ -36,7 +36,6 @@ omit = ["tests/*"]
addopts = "--strict-markers --strict-config --durations=5"
markers = [
"requires: mark tests as requiring a specific library",
- "asyncio: mark tests as requiring asyncio",
"compile: mark placeholder test used to compile integration tests without running them",
]
asyncio_mode = "auto"
diff --git a/libs/partners/mistralai/pyproject.toml b/libs/partners/mistralai/pyproject.toml
index 834c61a0a2..e3ed4d85a7 100644
--- a/libs/partners/mistralai/pyproject.toml
+++ b/libs/partners/mistralai/pyproject.toml
@@ -36,7 +36,6 @@ omit = ["tests/*"]
addopts = "--strict-markers --strict-config --durations=5"
markers = [
"requires: mark tests as requiring a specific library",
- "asyncio: mark tests as requiring asyncio",
"compile: mark placeholder test used to compile integration tests without running them",
]
asyncio_mode = "auto"
diff --git a/libs/partners/mongodb/pyproject.toml b/libs/partners/mongodb/pyproject.toml
index e850c36c00..a6faef2fd9 100644
--- a/libs/partners/mongodb/pyproject.toml
+++ b/libs/partners/mongodb/pyproject.toml
@@ -41,7 +41,6 @@ omit = ["tests/*"]
addopts = "--snapshot-warn-unused --strict-markers --strict-config --durations=5"
markers = [
"requires: mark tests as requiring a specific library",
- "asyncio: mark tests as requiring asyncio",
"compile: mark placeholder test used to compile integration tests without running them",
]
asyncio_mode = "auto"
diff --git a/libs/partners/nomic/pyproject.toml b/libs/partners/nomic/pyproject.toml
index d503e8395d..2f32386398 100644
--- a/libs/partners/nomic/pyproject.toml
+++ b/libs/partners/nomic/pyproject.toml
@@ -97,7 +97,6 @@ addopts = "--snapshot-warn-unused --strict-markers --strict-config --durations=5
# https://docs.pytest.org/en/7.1.x/example/markers.html#registering-markers
markers = [
"requires: mark tests as requiring a specific library",
- "asyncio: mark tests as requiring asyncio",
"compile: mark placeholder test used to compile integration tests without running them",
]
asyncio_mode = "auto"
diff --git a/libs/partners/openai/pyproject.toml b/libs/partners/openai/pyproject.toml
index d4c3a5875d..c33100e5ec 100644
--- a/libs/partners/openai/pyproject.toml
+++ b/libs/partners/openai/pyproject.toml
@@ -1,5 +1,5 @@
[build-system]
-requires = [ "poetry-core>=1.0.0",]
+requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.poetry]
@@ -28,20 +28,26 @@ openai = "^1.40.0"
tiktoken = ">=0.7,<1"
[tool.ruff.lint]
-select = [ "E", "F", "I", "T201",]
+select = ["E", "F", "I", "T201"]
[tool.ruff.format]
docstring-code-format = true
skip-magic-trailing-comma = true
[tool.coverage.run]
-omit = [ "tests/*",]
+omit = ["tests/*"]
[tool.pytest.ini_options]
addopts = "--snapshot-warn-unused --strict-markers --strict-config --durations=5 --cov=langchain_openai"
-markers = [ "requires: mark tests as requiring a specific library", "asyncio: mark tests as requiring asyncio", "compile: mark placeholder test used to compile integration tests without running them", "scheduled: mark tests to run in scheduled testing",]
+markers = [
+ "requires: mark tests as requiring a specific library",
+ "compile: mark placeholder test used to compile integration tests without running them",
+ "scheduled: mark tests to run in scheduled testing",
+]
asyncio_mode = "auto"
-filterwarnings = [ "ignore::langchain_core._api.beta_decorator.LangChainBetaWarning",]
+filterwarnings = [
+ "ignore::langchain_core._api.beta_decorator.LangChainBetaWarning",
+]
[tool.poetry.group.test]
optional = true
diff --git a/libs/partners/pinecone/pyproject.toml b/libs/partners/pinecone/pyproject.toml
index 6dbff96225..b37aec50bc 100644
--- a/libs/partners/pinecone/pyproject.toml
+++ b/libs/partners/pinecone/pyproject.toml
@@ -42,7 +42,6 @@ omit = ["tests/*"]
addopts = "--snapshot-warn-unused --strict-markers --strict-config --durations=5"
markers = [
"requires: mark tests as requiring a specific library",
- "asyncio: mark tests as requiring asyncio",
"compile: mark placeholder test used to compile integration tests without running them",
]
asyncio_mode = "auto"
diff --git a/libs/partners/pinecone/tests/integration_tests/test_embeddings.py b/libs/partners/pinecone/tests/integration_tests/test_embeddings.py
index 92e277ee44..56c9cd3e45 100644
--- a/libs/partners/pinecone/tests/integration_tests/test_embeddings.py
+++ b/libs/partners/pinecone/tests/integration_tests/test_embeddings.py
@@ -44,7 +44,6 @@ def test_embed_query(embd_client: PineconeEmbeddings) -> None:
assert len(out) == DIMENSION
async def test_aembed_query(embd_client: PineconeEmbeddings) -> None:
out = await embd_client.aembed_query("Hello, world!")
assert isinstance(out, list)
@@ -58,7 +57,6 @@ def test_embed_documents(embd_client: PineconeEmbeddings) -> None:
assert len(out[0]) == DIMENSION
async def test_aembed_documents(embd_client: PineconeEmbeddings) -> None:
out = await embd_client.aembed_documents(["Hello, world!", "This is a test."])
assert isinstance(out, list)
diff --git a/libs/partners/prompty/pyproject.toml b/libs/partners/prompty/pyproject.toml
index 32e34016c7..d39d06862c 100644
--- a/libs/partners/prompty/pyproject.toml
+++ b/libs/partners/prompty/pyproject.toml
@@ -91,7 +91,6 @@ addopts = "--snapshot-warn-unused --strict-markers --strict-config --durations=5
# https://docs.pytest.org/en/7.1.x/example/markers.html#registering-markers
markers = [
"requires: mark tests as requiring a specific library",
- "asyncio: mark tests as requiring asyncio",
"compile: mark placeholder test used to compile integration tests without running them",
]
asyncio_mode = "auto"
diff --git a/libs/partners/qdrant/pyproject.toml b/libs/partners/qdrant/pyproject.toml
index da4162b7f1..80c72fc12a 100644
--- a/libs/partners/qdrant/pyproject.toml
+++ b/libs/partners/qdrant/pyproject.toml
@@ -44,7 +44,6 @@ omit = ["tests/*"]
addopts = "--snapshot-warn-unused --strict-markers --strict-config --durations=5"
markers = [
"requires: mark tests as requiring a specific library",
- "asyncio: mark tests as requiring asyncio",
"compile: mark placeholder test used to compile integration tests without running them",
]
asyncio_mode = "auto"
diff --git a/libs/partners/voyageai/pyproject.toml b/libs/partners/voyageai/pyproject.toml
index 62c435a3c2..9b416f3ce5 100644
--- a/libs/partners/voyageai/pyproject.toml
+++ b/libs/partners/voyageai/pyproject.toml
@@ -96,7 +96,6 @@ addopts = "--strict-markers --strict-config --durations=5"
# https://docs.pytest.org/en/7.1.x/example/markers.html#registering-markers
markers = [
"requires: mark tests as requiring a specific library",
- "asyncio: mark tests as requiring asyncio",
"compile: mark placeholder test used to compile integration tests without running them",
]
asyncio_mode = "auto"
diff --git a/libs/text-splitters/pyproject.toml b/libs/text-splitters/pyproject.toml
index 8e74a32429..a23a8b09fb 100644
--- a/libs/text-splitters/pyproject.toml
+++ b/libs/text-splitters/pyproject.toml
@@ -1,5 +1,5 @@
[build-system]
-requires = [ "poetry-core>=1.0.0",]
+requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.poetry]
@@ -14,7 +14,14 @@ repository = "https://github.com/langchain-ai/langchain"
[tool.mypy]
disallow_untyped_defs = "True"
[[tool.mypy.overrides]]
-module = [ "transformers", "sentence_transformers", "nltk.tokenize", "konlpy.tag", "bs4", "pytest",]
+module = [
+ "transformers",
+ "sentence_transformers",
+ "nltk.tokenize",
+ "konlpy.tag",
+ "bs4",
+ "pytest",
+]
ignore_missing_imports = "True"
[tool.poetry.urls]
@@ -26,14 +33,17 @@ python = ">=3.9,<4.0"
langchain-core = "^0.3.0"
[tool.ruff.lint]
-select = [ "E", "F", "I", "T201",]
+select = ["E", "F", "I", "T201"]
[tool.coverage.run]
-omit = [ "tests/*",]
+omit = ["tests/*"]
[tool.pytest.ini_options]
addopts = "--strict-markers --strict-config --durations=5"
-markers = [ "requires: mark tests as requiring a specific library", "asyncio: mark tests as requiring asyncio", "compile: mark placeholder test used to compile integration tests without running them",]
+markers = [
+ "requires: mark tests as requiring a specific library",
+ "compile: mark placeholder test used to compile integration tests without running them",
+]
asyncio_mode = "auto"
[tool.poetry.group.lint]