mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-09-11 12:17:53 +02:00
Fix assertion
This commit is contained in:
@@ -219,9 +219,9 @@ class NodeBuilder:
|
||||
*channels: str,
|
||||
) -> Self:
|
||||
"""Adds the specified channels to read from, without subscribing to them."""
|
||||
assert isinstance(
|
||||
self._channels, list
|
||||
), "Cannot read additional channels when subscribed to single channels"
|
||||
assert isinstance(self._channels, list), (
|
||||
"Cannot read additional channels when subscribed to single channels"
|
||||
)
|
||||
self._channels.extend(channels)
|
||||
return self
|
||||
|
||||
|
||||
@@ -1677,9 +1677,9 @@ def test_state_graph_packets(
|
||||
|
||||
# Define decision-making logic
|
||||
def should_continue(data: dict) -> str:
|
||||
assert (
|
||||
data["something_extra"] == "hi there"
|
||||
), "nodes can pass extra data to their cond edges, which isn't saved in state"
|
||||
assert data["something_extra"] == "hi there", (
|
||||
"nodes can pass extra data to their cond edges, which isn't saved in state"
|
||||
)
|
||||
# Logic to decide whether to continue in the loop or exit
|
||||
if tool_calls := data["messages"][-1].tool_calls:
|
||||
return [Send("tools", tool_call) for tool_call in tool_calls]
|
||||
|
||||
@@ -1042,9 +1042,7 @@ async def test_partial_pending_checkpoint(
|
||||
"source": "update",
|
||||
"step": 1,
|
||||
},
|
||||
parent_config=(
|
||||
[c async for c in tool_two.checkpointer.alist(thread1, limit=2)][-1].config
|
||||
),
|
||||
parent_config=None,
|
||||
interrupts=(),
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user