langgraph: add proper type annotation for StateGraph.compile

This commit is contained in:
vbarda
2024-07-22 18:03:16 -04:00
parent 4bacbdd2bd
commit d00503ecc4
+2 -2
View File
@@ -371,7 +371,7 @@ class StateGraph(Graph):
interrupt_before: Optional[Union[All, Sequence[str]]] = None,
interrupt_after: Optional[Union[All, Sequence[str]]] = None,
debug: bool = False,
) -> CompiledGraph:
) -> "CompiledStateGraph":
"""Compiles the state graph into a `CompiledGraph` object.
The compiled graph implements the `Runnable` interface and can be invoked,
@@ -386,7 +386,7 @@ class StateGraph(Graph):
debug (bool): A flag indicating whether to enable debug mode.
Returns:
CompiledGraph: The compiled state graph.
CompiledStateGraph: The compiled state graph.
"""
# assign default values
interrupt_before = interrupt_before or []