diff --git a/.mypy.ini b/.mypy.ini index 67a2ca631..891aaa659 100644 --- a/.mypy.ini +++ b/.mypy.ini @@ -44,6 +44,10 @@ strict_optional = True strict_optional = True [mypy-aqt.preferences] strict_optional = True +[mypy-aqt.overview] +strict_optional = True +[mypy-aqt.customstudy] +strict_optional = True [mypy-aqt.taglimit] strict_optional = True [mypy-anki.scheduler.base] diff --git a/qt/aqt/customstudy.py b/qt/aqt/customstudy.py index 730f3843b..eb8921627 100644 --- a/qt/aqt/customstudy.py +++ b/qt/aqt/customstudy.py @@ -144,7 +144,11 @@ class CustomStudy(QDialog): form.spin.setValue(current_spinner_value) form.preSpin.setText(text_before_spinner) form.postSpin.setText(text_after_spinner) - form.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setText(ok) + + ok_button = form.buttonBox.button(QDialogButtonBox.StandardButton.Ok) + assert ok_button is not None + ok_button.setText(ok) + self.radioIdx = idx def accept(self) -> None: diff --git a/qt/aqt/overview.py b/qt/aqt/overview.py index 20d276dbb..da017714f 100644 --- a/qt/aqt/overview.py +++ b/qt/aqt/overview.py @@ -224,13 +224,14 @@ class Overview: dyn = "" return f'