mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-08-26 09:32:25 +02:00
Fix circular import
This commit is contained in:
@@ -1,9 +1,21 @@
|
||||
from types import MappingProxyType
|
||||
from typing import Any, Mapping
|
||||
|
||||
from langgraph.pregel.types import Interrupt, Send # noqa: F401
|
||||
|
||||
# Interrupt, Send re-exported for backwards compatibility
|
||||
def __getattr__(name: str) -> Any:
|
||||
if name in globals():
|
||||
return globals()[name]
|
||||
elif name == "Interrupt":
|
||||
from langgraph.pregel.types import Interrupt
|
||||
|
||||
return Interrupt
|
||||
elif name == "Send":
|
||||
from langgraph.pregel.types import Send
|
||||
|
||||
return Send
|
||||
raise AttributeError(f"module {__name__} has no attribute {name}")
|
||||
|
||||
|
||||
# --- Empty read-only containers ---
|
||||
EMPTY_MAP: Mapping[str, Any] = MappingProxyType({})
|
||||
|
||||
Reference in New Issue
Block a user