mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 15:32:23 -04:00
trailing whitespace
This commit is contained in:
parent
06b1ee47f9
commit
099202c28f
1 changed files with 7 additions and 7 deletions
14
anki/deck.py
14
anki/deck.py
|
@ -695,7 +695,7 @@ and priority in (1,2,3,4) and type in (0, 1)""", time=time)
|
||||||
self.resetAfterReviewEarly()
|
self.resetAfterReviewEarly()
|
||||||
spaceSusp = ""
|
spaceSusp = ""
|
||||||
c= self.newSpacedCount()
|
c= self.newSpacedCount()
|
||||||
if c:
|
if c:
|
||||||
spaceSusp += ngettext('There is <b>%d</b> delayed new card.',
|
spaceSusp += ngettext('There is <b>%d</b> delayed new card.',
|
||||||
'There are <b>%d</b> delayed new cards.',
|
'There are <b>%d</b> delayed new cards.',
|
||||||
c) % c
|
c) % c
|
||||||
|
@ -829,7 +829,7 @@ and due < :now""", now=time.time())
|
||||||
"All new cards, including spaced."
|
"All new cards, including spaced."
|
||||||
return self.s.scalar(
|
return self.s.scalar(
|
||||||
"select count(id) from cards where type = 2")
|
"select count(id) from cards where type = 2")
|
||||||
|
|
||||||
def newSpacedCount(self):
|
def newSpacedCount(self):
|
||||||
"Cards that are both spaced and new."
|
"Cards that are both spaced and new."
|
||||||
return self.s.scalar("""
|
return self.s.scalar("""
|
||||||
|
@ -2085,7 +2085,7 @@ facts.modelId = fieldModels.modelId and fieldModels.id not in
|
||||||
(select fieldModelId from fields where factId = facts.id)""")
|
(select fieldModelId from fields where factId = facts.id)""")
|
||||||
if ids:
|
if ids:
|
||||||
self.deleteFacts(ids)
|
self.deleteFacts(ids)
|
||||||
problems.append(ngettext("Deleted %d fact with missing fields",
|
problems.append(ngettext("Deleted %d fact with missing fields",
|
||||||
"Deleted %d facts with missing fields", len(ids)) %
|
"Deleted %d facts with missing fields", len(ids)) %
|
||||||
len(ids))
|
len(ids))
|
||||||
# cards missing a fact?
|
# cards missing a fact?
|
||||||
|
@ -2093,7 +2093,7 @@ facts.modelId = fieldModels.modelId and fieldModels.id not in
|
||||||
select id from cards where factId not in (select id from facts)""")
|
select id from cards where factId not in (select id from facts)""")
|
||||||
if ids:
|
if ids:
|
||||||
self.deleteCards(ids)
|
self.deleteCards(ids)
|
||||||
problems.append(ngettext("Deleted %d card with missing fact",
|
problems.append(ngettext("Deleted %d card with missing fact",
|
||||||
"Deleted %d cards with missing fact", len(ids)) %
|
"Deleted %d cards with missing fact", len(ids)) %
|
||||||
len(ids))
|
len(ids))
|
||||||
# cards missing a card model?
|
# cards missing a card model?
|
||||||
|
@ -2102,13 +2102,13 @@ select id from cards where cardModelId not in
|
||||||
(select id from cardModels)""")
|
(select id from cardModels)""")
|
||||||
if ids:
|
if ids:
|
||||||
self.deleteCards(ids)
|
self.deleteCards(ids)
|
||||||
problems.append(ngettext("Deleted %d card with no card template",
|
problems.append(ngettext("Deleted %d card with no card template",
|
||||||
"Deleted %d cards with no card template", len(ids)) %
|
"Deleted %d cards with no card template", len(ids)) %
|
||||||
len(ids))
|
len(ids))
|
||||||
# facts missing a card?
|
# facts missing a card?
|
||||||
ids = self.deleteDanglingFacts()
|
ids = self.deleteDanglingFacts()
|
||||||
if ids:
|
if ids:
|
||||||
problems.append(ngettext("Deleted %d fact with no cards",
|
problems.append(ngettext("Deleted %d fact with no cards",
|
||||||
"Deleted %d facts with no cards", len(ids)) %
|
"Deleted %d facts with no cards", len(ids)) %
|
||||||
len(ids))
|
len(ids))
|
||||||
# dangling fields?
|
# dangling fields?
|
||||||
|
@ -2117,7 +2117,7 @@ select id from fields where factId not in (select id from facts)""")
|
||||||
if ids:
|
if ids:
|
||||||
self.s.statement(
|
self.s.statement(
|
||||||
"delete from fields where id in %s" % ids2str(ids))
|
"delete from fields where id in %s" % ids2str(ids))
|
||||||
problems.append(ngettext("Deleted %d dangling field",
|
problems.append(ngettext("Deleted %d dangling field",
|
||||||
"Deleted %d dangling fields", len(ids)) %
|
"Deleted %d dangling fields", len(ids)) %
|
||||||
len(ids))
|
len(ids))
|
||||||
self.s.flush()
|
self.s.flush()
|
||||||
|
|
Loading…
Reference in a new issue