From 69a09adef655b221624780a1ecea36c27803cea9 Mon Sep 17 00:00:00 2001 From: Pedro Enrique Agurto Castillo <130622718+peteragurto@users.noreply.github.com> Date: Fri, 7 Nov 2025 07:52:27 -0500 Subject: [PATCH] fix(langgraph): export REMOVE_ALL_MESSAGES in __all__ to fix linting (#6375) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `REMOVE_ALL_MESSAGES` is a public constant used with `RemoveMessage` to clear all messages from the state: ```python from langchain_core.messages import RemoveMessage from langgraph.graph.message import REMOVE_ALL_MESSAGES # Clear all messages [RemoveMessage(id=REMOVE_ALL_MESSAGES)] ``` However, it is not exported in __all__, causing: Linting errors in IDEs (PyCharm) no-member warnings from Pylint Confusion for users This PR: Adds REMOVE_ALL_MESSAGES to __all__ Adds inline docstring with usage example No runtime behavior changes — only improves IDE support and API clarity. Thank you for contributing to LangGraph! Follow these steps to mark your pull request as ready for review. **If any of these steps are not completed, your PR will not be considered for review.** --- Local verification: ```bash # Before from langgraph.graph.message import REMOVE_ALL_MESSAGES # Pylint: no-member # After: no error ``` CI Note: This is a pure export/docs fix. `make lint` and `make test` pass unchanged. --- libs/langgraph/langgraph/graph/message.py | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/langgraph/langgraph/graph/message.py b/libs/langgraph/langgraph/graph/message.py index 7de775ea7..8470199a8 100644 --- a/libs/langgraph/langgraph/graph/message.py +++ b/libs/langgraph/langgraph/graph/message.py @@ -30,6 +30,7 @@ __all__ = ( "add_messages", "MessagesState", "MessageGraph", + "REMOVE_ALL_MESSAGES", ) Messages = list[MessageLikeRepresentation] | MessageLikeRepresentation