From 47fe321e31180a9dbab7e1ca7928597eff8eaf6a Mon Sep 17 00:00:00 2001 From: Nuno Campos Date: Sun, 22 Sep 2024 12:51:06 -0700 Subject: [PATCH] Lint --- libs/langgraph/langgraph/constants.py | 4 ++-- libs/langgraph/langgraph/utils/config.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/langgraph/langgraph/constants.py b/libs/langgraph/langgraph/constants.py index 80713b839..4c6733ac5 100644 --- a/libs/langgraph/langgraph/constants.py +++ b/libs/langgraph/langgraph/constants.py @@ -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 @@ # 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 = { diff --git a/libs/langgraph/langgraph/utils/config.py b/libs/langgraph/langgraph/utils/config.py index 4261fc47c..6f75c64ba 100644 --- a/libs/langgraph/langgraph/utils/config.py +++ b/libs/langgraph/langgraph/utils/config.py @@ -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