mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-08-21 07:02:25 +02:00
linting for 3.12
This commit is contained in:
@@ -239,12 +239,12 @@ class PregelNode(Runnable):
|
||||
)
|
||||
|
||||
def join(self, channels: Sequence[str]) -> PregelNode:
|
||||
assert isinstance(channels, list) or isinstance(channels, tuple), (
|
||||
"channels must be a list or tuple"
|
||||
)
|
||||
assert isinstance(self.channels, dict), (
|
||||
"all channels must be named when using .join()"
|
||||
)
|
||||
assert isinstance(channels, list) or isinstance(
|
||||
channels, tuple
|
||||
), "channels must be a list or tuple"
|
||||
assert isinstance(
|
||||
self.channels, dict
|
||||
), "all channels must be named when using .join()"
|
||||
return self.copy(
|
||||
update=dict(
|
||||
channels={
|
||||
|
||||
@@ -1573,9 +1573,9 @@ def test_migrate_checkpoints(source: str, target: str) -> None:
|
||||
migrated["versions_seen"][c][v].split(".")[0]
|
||||
)
|
||||
# check that the migrated checkpoint matches the target checkpoint
|
||||
assert migrated == target_checkpoint.checkpoint, (
|
||||
f"Checkpoint mismatch at index {idx}"
|
||||
)
|
||||
assert (
|
||||
migrated == target_checkpoint.checkpoint
|
||||
), f"Checkpoint mismatch at index {idx}"
|
||||
|
||||
|
||||
@NEEDS_CONTEXTVARS
|
||||
|
||||
@@ -2830,9 +2830,9 @@ def test_state_graph_packets(
|
||||
# Define decision-making logic
|
||||
def should_continue(data: dict) -> str:
|
||||
assert isinstance(data["session"], httpx.Client)
|
||||
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]
|
||||
|
||||
Reference in New Issue
Block a user