Fix assertion

This commit is contained in:
Nuno Campos
2025-06-26 01:30:52 +02:00
committed by Tat Dat Duong
parent 005edb2979
commit 38ab90217f
3 changed files with 7 additions and 9 deletions
+3 -3
View File
@@ -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
+3 -3
View File
@@ -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]
+1 -3
View File
@@ -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=(),
)