fix formatting & lint

This commit is contained in:
Damien Elmes 2020-08-21 12:34:44 +10:00
parent 45fd52d49a
commit 2a8a4e9780

View File

@ -9,7 +9,7 @@ import html
import json import json
import re import re
import unicodedata as ucd import unicodedata as ucd
from typing import Callable, List, Optional, Sequence, Tuple, Union from typing import Callable, List, Optional, Tuple, Union
from PyQt5.QtCore import Qt from PyQt5.QtCore import Qt
@ -624,12 +624,22 @@ time = %(time)d;
def _answerButtonList(self) -> Tuple[Tuple[int, str], ...]: def _answerButtonList(self) -> Tuple[Tuple[int, str], ...]:
button_count = self.mw.col.sched.answerButtons(self.card) button_count = self.mw.col.sched.answerButtons(self.card)
if button_count == 2: if button_count == 2:
buttons_tuple: Tuple[Tuple[int, str], ...] = ((1, _("Again")), (2, _("Good")),) buttons_tuple: Tuple[Tuple[int, str], ...] = (
(1, _("Again")),
(2, _("Good")),
)
elif button_count == 3: elif button_count == 3:
buttons_tuple = ((1, _("Again")), (2, _("Good")), (3, _("Easy"))) buttons_tuple = ((1, _("Again")), (2, _("Good")), (3, _("Easy")))
else: else:
buttons_tuple = ((1, _("Again")), (2, _("Hard")), (3, _("Good")), (4, _("Easy"))) buttons_tuple = (
buttons_tuple = gui_hooks.reviewer_will_init_answer_buttons(buttons_tuple, self, self.card) (1, _("Again")),
(2, _("Hard")),
(3, _("Good")),
(4, _("Easy")),
)
buttons_tuple = gui_hooks.reviewer_will_init_answer_buttons(
buttons_tuple, self, self.card
)
return buttons_tuple return buttons_tuple
def _answerButtons(self) -> str: def _answerButtons(self) -> str: