mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -04:00
Clean up reviewer code from unused code
This commit is contained in:
parent
8d0eb42c01
commit
f90f3dbc53
1 changed files with 2 additions and 9 deletions
|
@ -159,10 +159,8 @@ class Reviewer:
|
|||
if c.isEmpty():
|
||||
q = _("""\
|
||||
The front of this card is empty. Please run Tools>Empty Cards.""")
|
||||
a = ""
|
||||
else:
|
||||
q = c.q()
|
||||
a = c.a()
|
||||
if self.autoplay(c):
|
||||
playFromText(q)
|
||||
# render & update bottom
|
||||
|
@ -386,11 +384,7 @@ Please run Tools>Empty Cards""")
|
|||
# compare in NFC form so accents appear correct
|
||||
given = ucd.normalize("NFC", given)
|
||||
correct = ucd.normalize("NFC", correct)
|
||||
try:
|
||||
s = difflib.SequenceMatcher(None, given, correct, autojunk=False)
|
||||
except:
|
||||
# autojunk was added in python 2.7.1
|
||||
s = difflib.SequenceMatcher(None, given, correct)
|
||||
s = difflib.SequenceMatcher(None, given, correct, autojunk=False)
|
||||
givenElems = []
|
||||
correctElems = []
|
||||
givenPoint = 0
|
||||
|
@ -535,7 +529,6 @@ time = %(time)d;
|
|||
return l + ((2, _("Hard")), (3, _("Good")), (4, _("Easy")))
|
||||
|
||||
def _answerButtons(self):
|
||||
times = []
|
||||
default = self._defaultEase()
|
||||
def but(i, label):
|
||||
if i == default:
|
||||
|
@ -599,7 +592,7 @@ time = %(time)d;
|
|||
m = QMenu(self.mw)
|
||||
self._addMenuItems(m, opts)
|
||||
|
||||
runHook("Reviewer.contextMenuEvent",self,m)
|
||||
runHook("Reviewer.contextMenuEvent", self, m)
|
||||
m.exec_(QCursor.pos())
|
||||
|
||||
def _addMenuItems(self, m, rows):
|
||||
|
|
Loading…
Reference in a new issue