[PR #6375] fix(langgraph): export REMOVE_ALL_MESSAGES in __all__ to fix linting #5002

Closed
opened 2026-02-20 17:51:04 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langchain-ai/langgraph/pull/6375

State: closed
Merged: Yes


REMOVE_ALL_MESSAGES is a public constant used with RemoveMessage to clear all messages from the state:

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:

# 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.

**Original Pull Request:** https://github.com/langchain-ai/langgraph/pull/6375 **State:** closed **Merged:** Yes --- `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.
yindo added the pull-request label 2026-02-20 17:51:04 -05:00
yindo closed this issue 2026-02-20 17:51:05 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraph#5002