mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-08-29 03:09:45 +02:00
Lint
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import sys
|
||||
from types import MappingProxyType
|
||||
from typing import Any, Mapping
|
||||
from typing import Any, Literal, Mapping, cast
|
||||
|
||||
from langgraph.types import Interrupt, Send # noqa: F401
|
||||
|
||||
@@ -73,7 +73,7 @@ NS_SEP = sys.intern("|")
|
||||
# for checkpoint_ns, separates each level (ie. graph|subgraph|subsubgraph)
|
||||
NS_END = sys.intern(":")
|
||||
# for checkpoint_ns, for each level, separates the namespace from the task_id
|
||||
CONF = sys.intern("configurable")
|
||||
CONF = cast(Literal["configurable"], sys.intern("configurable"))
|
||||
# key for the configurable dict in RunnableConfig
|
||||
|
||||
RESERVED = {
|
||||
|
||||
@@ -83,9 +83,9 @@ def merge_configs(*configs: Optional[RunnableConfig]) -> RunnableConfig:
|
||||
base[key] = value # type: ignore[literal-required]
|
||||
elif key == CONF:
|
||||
if base_value := base.get(key):
|
||||
base[key] = {**base_value, **value} # type: ignore
|
||||
base[key] = {**base_value, **value} # type: ignore[dict-item]
|
||||
else:
|
||||
base[key] = value # type: ignore[literal-required]
|
||||
base[key] = value
|
||||
elif key == "callbacks":
|
||||
base_callbacks = base.get("callbacks")
|
||||
# callbacks can be either None, list[handler] or manager
|
||||
|
||||
Reference in New Issue
Block a user