some fixes again

This commit is contained in:
Ayzen
2026-06-05 17:50:59 +03:00
parent bbea744459
commit 3c30a12d4a
24 changed files with 209 additions and 157 deletions
+3 -4
View File
@@ -15,8 +15,8 @@ THistoryCollection = TypeVar("THistoryCollection", SweepCollection, ResultCollec
def record_result_history(
result_history: deque[ResultCollection],
collection: ResultCollection,
) -> bool:
"""Append new result or replace existing entry by stable collection key."""
) -> None:
"""Append a new result, or replace the existing entry with the same stable key."""
for index in range(len(result_history) - 1, -1, -1):
existing = result_history[index]
if (
@@ -24,10 +24,9 @@ def record_result_history(
and existing.monotonic_ns == collection.monotonic_ns
):
result_history[index] = collection
return True
return
result_history.append(collection)
return True
def remove_last_aligned_histories(