Skip to content

Commit 69a09ad

Browse files
authored
fix(langgraph): export REMOVE_ALL_MESSAGES in __all__ to fix linting (#6375)
`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.
1 parent 35aa98b commit 69a09ad

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

libs/langgraph/langgraph/graph/message.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"add_messages",
3131
"MessagesState",
3232
"MessageGraph",
33+
"REMOVE_ALL_MESSAGES",
3334
)
3435

3536
Messages = list[MessageLikeRepresentation] | MessageLikeRepresentation

0 commit comments

Comments
 (0)