From d67b4b2ed99b8c9213213329cfbfa0e1a5ef75c6 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Thu, 11 Jun 2009 22:49:15 +0900 Subject: [PATCH] remove obsolote newSpacedCount() --- anki/deck.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/anki/deck.py b/anki/deck.py index 122242735..2301d4994 100644 --- a/anki/deck.py +++ b/anki/deck.py @@ -733,7 +733,7 @@ and priority in (1,2,3,4) and type in (0, 1)""", time=time) def deckFinishedMsg(self): self.resetAfterReviewEarly() spaceSusp = "" - c= self.newSpacedCount() + c= self.spacedCardCount() if c: spaceSusp += ngettext('There is %d delayed new card.', 'There are %d delayed new cards.', @@ -861,6 +861,7 @@ select count(id) from cards where type in (0,1,2) and priority = 0""") self._dailyStats.newEase4) def spacedCardCount(self): + "Number of spaced new cards." return self.s.scalar(""" select count(cards.id) from cards %s where type = 2 and isDue = 0 and priority in (1,2,3,4) and combinedDue > :now @@ -884,13 +885,6 @@ and due < :now""" % self.forceIndex("ix_cards_priorityDue"), now=time.time()) return self.s.scalar( "select count(id) from cards where type = 2") - def newSpacedCount(self): - "Cards that are both spaced and new." - return self.s.scalar(""" - select count(cards.id) from cards where -type = 2 and isDue = 0 and priority in (1,2,3,4) and combinedDue > :now -and due < :now""", now=time.time()) - # Card predicates ##########################################################################