mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
Enable strict_optional for aqt/modelchooser.py (#3539)
* Enable strict_optional * Fix mypy errors
This commit is contained in:
parent
fbd53726cc
commit
7f58ca213c
2 changed files with 3 additions and 0 deletions
|
@ -50,6 +50,8 @@ strict_optional = True
|
|||
strict_optional = True
|
||||
[mypy-aqt.taglimit]
|
||||
strict_optional = True
|
||||
[mypy-aqt.modelchooser]
|
||||
strict_optional = True
|
||||
[mypy-aqt.deckdescription]
|
||||
strict_optional = True
|
||||
[mypy-aqt.deckbrowser]
|
||||
|
|
|
@ -84,6 +84,7 @@ class ModelChooser(QHBoxLayout):
|
|||
if not ret.name:
|
||||
return
|
||||
m = self.deck.models.by_name(ret.name)
|
||||
assert m is not None
|
||||
self.deck.conf["curModel"] = m["id"]
|
||||
cdeck = self.deck.decks.current()
|
||||
cdeck["mid"] = m["id"]
|
||||
|
|
Loading…
Reference in a new issue