Merge pull request #3534 from bpnguyen107/aqt-strict-optional-customstudy

Enable strict_optional for aqt/customstudy.py
This commit is contained in:
Abdo 2024-10-27 17:04:07 +03:00 committed by GitHub
commit 70eade0b8f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

View file

@ -44,6 +44,8 @@ strict_optional = True
strict_optional = True
[mypy-aqt.preferences]
strict_optional = True
[mypy-aqt.customstudy]
strict_optional = True
[mypy-anki.scheduler.base]
strict_optional = True
[mypy-anki._backend.rsbridge]

View file

@ -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: