mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-09-25 11:05:12 +02:00
Merge pull request #2437 from langchain-ai/nc/16nov/speed-up-find-subgraph
lib: find_subgraph doesn't need to look in both func and afunc
This commit is contained in:
@@ -48,7 +48,7 @@ def find_subgraph_pregel(candidate: Runnable) -> Optional[Runnable]:
|
||||
nl.__self__ if hasattr(nl, "__self__") else nl
|
||||
for nl in get_function_nonlocals(c.func)
|
||||
)
|
||||
if c.afunc is not None:
|
||||
elif c.afunc is not None:
|
||||
candidates.extend(
|
||||
nl.__self__ if hasattr(nl, "__self__") else nl
|
||||
for nl in get_function_nonlocals(c.afunc)
|
||||
|
||||
Reference in New Issue
Block a user