diff --git a/langgraph/graph/state.py b/langgraph/graph/state.py index 45fb5ec65..1a3f5530e 100644 --- a/langgraph/graph/state.py +++ b/langgraph/graph/state.py @@ -122,3 +122,4 @@ def _is_field_binop(typ: Type[Any]) -> Optional[BinaryOperatorAggregate]: ] ): return BinaryOperatorAggregate(typ, meta[0]) + return None diff --git a/langgraph/pregel/read.py b/langgraph/pregel/read.py index 0d566791f..78129b5b0 100644 --- a/langgraph/pregel/read.py +++ b/langgraph/pregel/read.py @@ -104,7 +104,7 @@ class ChannelInvoke(RunnableBindingBase): when=when, bound=bound or default_bound, kwargs=kwargs or {}, - config=merge_configs(config, {"tags": tags}), + config=merge_configs(config, {"tags": tags or []}), **other_kwargs, ) diff --git a/tests/test_pregel.py b/tests/test_pregel.py index fd4a986b5..0ad0b5752 100644 --- a/tests/test_pregel.py +++ b/tests/test_pregel.py @@ -811,7 +811,7 @@ def test_conditional_graph_state() -> None: ] ) - def agent_parser(input: str) -> Union[AgentAction, AgentFinish]: + def agent_parser(input: str) -> dict[str, Union[AgentAction, AgentFinish]]: if input.startswith("finish"): _, answer = input.split(":") return { diff --git a/tests/test_pregel_async.py b/tests/test_pregel_async.py index 6799bdd73..1b162cbb8 100644 --- a/tests/test_pregel_async.py +++ b/tests/test_pregel_async.py @@ -865,7 +865,7 @@ async def test_conditional_graph_state() -> None: ] ) - def agent_parser(input: str) -> Union[AgentAction, AgentFinish]: + def agent_parser(input: str) -> dict[str, Union[AgentAction, AgentFinish]]: if input.startswith("finish"): _, answer = input.split(":") return {