From 2239aae8563bf9d0f535bf251af34161635df8a4 Mon Sep 17 00:00:00 2001 From: Sydney Runkle Date: Wed, 6 May 2026 15:08:37 -0400 Subject: [PATCH] fix(lint): remove redundant cast flagged by mypy --- libs/langgraph/langgraph/graph/message.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/langgraph/langgraph/graph/message.py b/libs/langgraph/langgraph/graph/message.py index 091613e77..04d5f1893 100644 --- a/libs/langgraph/langgraph/graph/message.py +++ b/libs/langgraph/langgraph/graph/message.py @@ -282,7 +282,7 @@ def _messages_delta_reducer( # (never chunks), so skip convert_to_messages on the fast path. # Only raw input (initial dicts, deserialized blobs) hits the slow path. if state and isinstance(state[0], BaseMessage): - state_msgs = cast("list[AnyMessage]", state) + state_msgs = state else: state_msgs = cast( "list[AnyMessage]",