fix: format import order in checkpoint and checkpoint-postgres

This commit is contained in:
Sydney Runkle
2026-04-27 20:46:16 -04:00
parent bf30da1c8f
commit 6a2e00df9b
2 changed files with 14 additions and 5 deletions
@@ -291,13 +291,18 @@ class BasePostgresSaver(BaseCheckpointSaver[str]):
# Step-based snapshot: collect this ancestor's
# pending_writes first (they encode the NEXT step's
# transition, not subsumed by the snapshot blob).
for type_tag, write_blob, task_id, _idx in writes_by_cid.get(
cid, []
):
for (
type_tag,
write_blob,
task_id,
_idx,
) in writes_by_cid.get(cid, []):
val = self.serde.loads_typed((type_tag, write_blob))
collected.append((task_id, channel, val))
collected.reverse()
return _ChannelWritesHistory(seed=blob_value, writes=collected)
return _ChannelWritesHistory(
seed=blob_value, writes=collected
)
# Pre-delta blob: subsumes this ancestor's writes.
collected.reverse()
return _ChannelWritesHistory(seed=blob_value, writes=collected)
@@ -33,7 +33,11 @@ from langchain_core.load.load import Reviver
from langgraph.checkpoint.serde import _msgpack as _lg_msgpack
from langgraph.checkpoint.serde.base import SerializerProtocol
from langgraph.checkpoint.serde.event_hooks import emit_serde_event
from langgraph.checkpoint.serde.types import DELTA_SENTINEL, SendProtocol, _DeltaSnapshot
from langgraph.checkpoint.serde.types import (
DELTA_SENTINEL,
SendProtocol,
_DeltaSnapshot,
)
from langgraph.store.base import Item
if TYPE_CHECKING: