From 74997f97a28ff9ee922f3d23fdf4cdc8d6fe1ec4 Mon Sep 17 00:00:00 2001 From: Jarrett Ye Date: Thu, 19 Jun 2025 16:01:22 +0800 Subject: [PATCH] Add decay attribute to ComputedMemoryState and update Collection methods --- pylib/anki/collection.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pylib/anki/collection.py b/pylib/anki/collection.py index 17ee08e2f..6cf38174c 100644 --- a/pylib/anki/collection.py +++ b/pylib/anki/collection.py @@ -122,6 +122,7 @@ class ComputedMemoryState: desired_retention: float stability: float | None = None difficulty: float | None = None + decay: float | None = None @dataclass @@ -1189,9 +1190,13 @@ class Collection(DeprecatedNamesMixin): desired_retention=resp.desired_retention, stability=resp.state.stability, difficulty=resp.state.difficulty, + decay=resp.decay, ) else: - return ComputedMemoryState(desired_retention=resp.desired_retention) + return ComputedMemoryState( + desired_retention=resp.desired_retention, + decay=resp.decay, + ) def fuzz_delta(self, card_id: CardId, interval: int) -> int: "The delta days of fuzz applied if reviewing the card in v3."