From f054fa14d618393ccf0c14218fef11669745935b Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Wed, 4 Mar 2020 12:26:57 +1000 Subject: [PATCH] reuse _leftToday() --- pylib/anki/sched.py | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/pylib/anki/sched.py b/pylib/anki/sched.py index 0030571b3..e40b53ccb 100644 --- a/pylib/anki/sched.py +++ b/pylib/anki/sched.py @@ -420,21 +420,6 @@ limit %d""" tod = self._leftToday(conf["delays"], tot) return tot + tod * 1000 - def _leftToday( - self, delays: List[int], left: int, now: Optional[int] = None - ) -> int: - "The number of steps that can be completed by the day cutoff." - if not now: - now = intTime() - delays = delays[-left:] - ok = 0 - for i in range(len(delays)): - now += delays[i] * 60 - if now > self.dayCutoff: - break - ok = i - return ok + 1 - def _graduatingIvl( self, card: Card, conf: Dict[str, Any], early: bool, adj: bool = True ) -> int: