linting for 3.12

This commit is contained in:
Sydney Runkle
2025-04-21 21:01:27 -07:00
parent 1a477e57ff
commit b6ea73ff24
3 changed files with 12 additions and 12 deletions
+6 -6
View File
@@ -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
+3 -3
View File
@@ -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]