From cba7d217321cc5cbb7e055aacc8875fe3a262d27 Mon Sep 17 00:00:00 2001 From: Sydney Runkle Date: Mon, 21 Apr 2025 21:14:14 -0700 Subject: [PATCH] fix tests? --- libs/langgraph/pyproject.toml | 2 +- libs/langgraph/tests/test_channels.py | 4 ++-- libs/langgraph/tests/test_runnable.py | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/libs/langgraph/pyproject.toml b/libs/langgraph/pyproject.toml index 1b3c6d297..f3e2a9b1c 100644 --- a/libs/langgraph/pyproject.toml +++ b/libs/langgraph/pyproject.toml @@ -42,7 +42,7 @@ pycryptodome = "^3.21.0" [tool.ruff] lint.select = [ "E", "F", "I", "TID251", "UP" ] -lint.ignore = [ "E501" ] +lint.ignore = [ "E501", "UP007" ] line-length = 88 indent-width = 4 extend-include = ["*.ipynb"] diff --git a/libs/langgraph/tests/test_channels.py b/libs/langgraph/tests/test_channels.py index 0b18f7dd6..c8d679ab8 100644 --- a/libs/langgraph/tests/test_channels.py +++ b/libs/langgraph/tests/test_channels.py @@ -34,7 +34,7 @@ def test_last_value() -> None: def test_topic() -> None: channel = Topic(str).from_checkpoint(MISSING) - assert channel.ValueType is Sequence[str] + assert channel.ValueType == Sequence[str] assert channel.UpdateType is Union[str, list[str]] assert channel.update(["a", "b"]) @@ -58,7 +58,7 @@ def test_topic() -> None: def test_topic_accumulate() -> None: channel = Topic(str, accumulate=True).from_checkpoint(MISSING) - assert channel.ValueType is Sequence[str] + assert channel.ValueType == Sequence[str] assert channel.UpdateType is Union[str, list[str]] assert channel.update(["a", "b"]) diff --git a/libs/langgraph/tests/test_runnable.py b/libs/langgraph/tests/test_runnable.py index 1189c6688..0a81be368 100644 --- a/libs/langgraph/tests/test_runnable.py +++ b/libs/langgraph/tests/test_runnable.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any +from typing import Any, Optional import pytest @@ -85,7 +85,7 @@ def test_runnable_callable_injectable_arguments() -> None: """ # Test Optional[BaseStore] annotation. - def func_optional_store(inputs: Any, store: BaseStore | None) -> str: + def func_optional_store(inputs: Any, store: Optional[BaseStore]) -> str: """Test function that accepts an optional store parameter.""" assert store is None return "success" @@ -159,12 +159,12 @@ async def test_runnable_callable_injectable_arguments_async() -> None: """ # Test Optional[BaseStore] annotation. - def func_optional_store(inputs: Any, store: BaseStore | None) -> str: + def func_optional_store(inputs: Any, store: Optional[BaseStore]) -> str: """Test function that accepts an optional store parameter.""" assert store is None return "success" - async def afunc_optional_store(inputs: Any, store: BaseStore | None) -> str: + async def afunc_optional_store(inputs: Any, store: Optional[BaseStore]) -> str: """Async version of func_optional_store.""" assert store is None return "success"