Fix StateGraph.add_edge end_key check

It looks like a typo to me: `END` should be `START`.

`END` should be accepted as `end_key` and it is accepted with the `super` call path.
This commit is contained in:
Mihai Capotă
2024-07-22 15:55:19 -07:00
committed by GitHub
parent ab80c113ac
commit 3f43e0d945
+2 -2
View File
@@ -358,8 +358,8 @@ class StateGraph(Graph):
raise ValueError("END cannot be a start node")
if start not in self.nodes:
raise ValueError(f"Need to add_node `{start}` first")
if end_key == END:
raise ValueError("END cannot be an end node")
if end_key == START:
raise ValueError("START cannot be an end node")
if end_key not in self.nodes:
raise ValueError(f"Need to add_node `{end_key}` first")