diff --git a/anki/models.py b/anki/models.py index c32ae0be2..310a1a0fc 100644 --- a/anki/models.py +++ b/anki/models.py @@ -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)) diff --git a/anki/sched.py b/anki/sched.py index 5e9a8b22f..be6242b85 100644 --- a/anki/sched.py +++ b/anki/sched.py @@ -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)