Merge pull request #209 from sieben/simplify_comparisons
Simplify comparisons
This commit is contained in:
commit
bd414595de
@ -240,7 +240,7 @@ and notes.mid = ? and cards.ord = ?""", m['id'], ord)
|
||||
return m['sortf']
|
||||
|
||||
def setSortIdx(self, m, idx):
|
||||
assert idx >= 0 and idx < len(m['flds'])
|
||||
assert 0 <= idx < len(m['flds'])
|
||||
self.col.modSchema(check=True)
|
||||
m['sortf'] = idx
|
||||
self.col.updateFieldCache(self.nids(m))
|
||||
|
@ -56,7 +56,7 @@ class Scheduler:
|
||||
|
||||
def answerCard(self, card, ease):
|
||||
self.col.log()
|
||||
assert ease >= 1 and ease <= 4
|
||||
assert 1 <= ease <= 4
|
||||
self.col.markReview(card)
|
||||
if self._burySiblingsOnAnswer:
|
||||
self._burySiblings(card)
|
||||
|
Loading…
Reference in New Issue
Block a user