mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-09-27 20:15:00 +02:00
chore: ruff format fixes
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -357,9 +357,9 @@ class BasePostgresSaver(BaseCheckpointSaver[str]):
|
||||
a `_ChannelWritesHistory` per requested channel.
|
||||
"""
|
||||
# writes_by_ch_by_cid[channel][cid] = list of (type, blob, task_id, idx)
|
||||
writes_by_ch_by_cid: dict[
|
||||
str, dict[str, list[tuple[str, bytes, str, int]]]
|
||||
] = {ch: {} for ch in channels}
|
||||
writes_by_ch_by_cid: dict[str, dict[str, list[tuple[str, bytes, str, int]]]] = {
|
||||
ch: {} for ch in channels
|
||||
}
|
||||
# seed_blob_by_ver[(channel, version)] = (type, blob)
|
||||
seed_blob_by_ver: dict[tuple[str, str], tuple[str, bytes]] = {}
|
||||
|
||||
|
||||
@@ -189,9 +189,7 @@ class InMemorySaver(
|
||||
ver = versions.get(ch)
|
||||
if ver is None:
|
||||
continue
|
||||
blob_entry = self.blobs.get(
|
||||
(thread_id, checkpoint_ns, ch, ver)
|
||||
)
|
||||
blob_entry = self.blobs.get((thread_id, checkpoint_ns, ch, ver))
|
||||
if blob_entry is None or blob_entry[0] == "empty":
|
||||
continue
|
||||
blob_value = self.serde.loads_typed(blob_entry)
|
||||
|
||||
@@ -482,9 +482,9 @@ class TestBaseFallbackGetChannelWrites:
|
||||
}
|
||||
}
|
||||
|
||||
result = saver._get_all_delta_channels_writes_history(
|
||||
config, ["messages"]
|
||||
)["messages"]
|
||||
result = saver._get_all_delta_channels_writes_history(config, ["messages"])[
|
||||
"messages"
|
||||
]
|
||||
|
||||
assert result.seed is DELTA_SENTINEL
|
||||
values = [v for _, _, v in result.writes]
|
||||
|
||||
@@ -136,9 +136,7 @@ def channels_from_checkpoint(
|
||||
]
|
||||
histories: Mapping[str, Any] = {}
|
||||
if delta_channels and saver is not None and config is not None:
|
||||
histories = saver._get_all_delta_channels_writes_history(
|
||||
config, delta_channels
|
||||
)
|
||||
histories = saver._get_all_delta_channels_writes_history(config, delta_channels)
|
||||
|
||||
channels: dict[str, BaseChannel] = {}
|
||||
for k, spec in channel_specs.items():
|
||||
|
||||
Reference in New Issue
Block a user