mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-08-30 19:59:40 +02:00
fix tests?
This commit is contained in:
@@ -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"]
|
||||
|
||||
@@ -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"])
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user