chore: ruff format fixes

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Quanzheng Long
2026-05-01 10:41:56 -07:00
co-authored by Cursor
parent 8c2a30af8a
commit bc263888b1
4 changed files with 8 additions and 12 deletions
@@ -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)
+3 -3
View File
@@ -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():