From 290cd4b7732d4695b58358611e0f7d069bb155c8 Mon Sep 17 00:00:00 2001 From: "open-swe-dev[bot]" Date: Thu, 17 Jul 2025 20:05:48 +0000 Subject: [PATCH] Apply patch --- libs/langgraph/langgraph/graph/state.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libs/langgraph/langgraph/graph/state.py b/libs/langgraph/langgraph/graph/state.py index 097fb4193..13d9d22c9 100644 --- a/libs/langgraph/langgraph/graph/state.py +++ b/libs/langgraph/langgraph/graph/state.py @@ -994,7 +994,9 @@ class CompiledStateGraph( elif isinstance(command.goto, str): # Validate that the goto target exists in the graph if command.goto != END and command.goto not in self.builder.nodes: - raise InvalidUpdateError(f"Node '{command.goto}' does not exist in the graph") + raise InvalidUpdateError( + f"Node '{command.goto}' does not exist in the graph" + ) rtn.append((CHANNEL_BRANCH_TO.format(command.goto), None)) else: # Handle sequence of goto targets @@ -1004,7 +1006,9 @@ class CompiledStateGraph( else: # Validate that the goto target exists in the graph if go != END and go not in self.builder.nodes: - raise InvalidUpdateError(f"Node '{go}' does not exist in the graph") + raise InvalidUpdateError( + f"Node '{go}' does not exist in the graph" + ) rtn.append((CHANNEL_BRANCH_TO.format(go), None)) return rtn @@ -1456,4 +1460,3 @@ def _get_json_schema( CHANNEL_BRANCH_TO = "branch:to:{}" -