[PR #5555] chore(prebuilt): Remove dead code from prebuilt tests #4521

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

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

State: closed
Merged: Yes


Fixes #5554

This PR removes unused utility classes and functions from the prebuilt tests directory to clean up dead code.

Changes include:

  • Removed unused classes from libs/prebuilt/tests/any_str.py:

    • Deleted FloatBetween, AnyDict, AnyVersion, and UnsortedSequence
    • Kept only AnyStr class
  • Removed unused functions from libs/prebuilt/tests/messages.py:

    • Deleted _AnyIdDocument and _AnyIdAIMessageChunk
    • Kept _AnyIdHumanMessage and _AnyIdToolMessage
  • Removed unused classes from libs/prebuilt/tests/memory_assert.py:

    • Deleted NoopSerializer, MemorySaverAssertCheckpointMetadata, and MemorySaverNoPending
    • Kept MemorySaverAssertImmutable

Verification:

  • Manually checked for no remaining references to removed code
  • Maintained existing import structures
  • Preserved functionality of the prebuilt test suite

The changes reduce code complexity and remove unnecessary utility classes that were not being used in the test suite.

**Original Pull Request:** https://github.com/langchain-ai/langgraph/pull/5555 **State:** closed **Merged:** Yes --- Fixes #5554 This PR removes unused utility classes and functions from the prebuilt tests directory to clean up dead code. Changes include: - Removed unused classes from `libs/prebuilt/tests/any_str.py`: - Deleted FloatBetween, AnyDict, AnyVersion, and UnsortedSequence - Kept only AnyStr class - Removed unused functions from `libs/prebuilt/tests/messages.py`: - Deleted _AnyIdDocument and _AnyIdAIMessageChunk - Kept _AnyIdHumanMessage and _AnyIdToolMessage - Removed unused classes from `libs/prebuilt/tests/memory_assert.py`: - Deleted NoopSerializer, MemorySaverAssertCheckpointMetadata, and MemorySaverNoPending - Kept MemorySaverAssertImmutable Verification: - Manually checked for no remaining references to removed code - Maintained existing import structures - Preserved functionality of the prebuilt test suite The changes reduce code complexity and remove unnecessary utility classes that were not being used in the test suite.
yindo added the pull-request label 2026-02-20 17:50:19 -05:00
yindo closed this issue 2026-02-20 17:50:19 -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#4521