mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -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
|
strict_optional = True
|
||||||
[mypy-aqt.taglimit]
|
[mypy-aqt.taglimit]
|
||||||
strict_optional = True
|
strict_optional = True
|
||||||
|
[mypy-aqt.modelchooser]
|
||||||
|
strict_optional = True
|
||||||
[mypy-aqt.deckdescription]
|
[mypy-aqt.deckdescription]
|
||||||
strict_optional = True
|
strict_optional = True
|
||||||
[mypy-aqt.deckbrowser]
|
[mypy-aqt.deckbrowser]
|
||||||
|
|
|
@ -84,6 +84,7 @@ class ModelChooser(QHBoxLayout):
|
||||||
if not ret.name:
|
if not ret.name:
|
||||||
return
|
return
|
||||||
m = self.deck.models.by_name(ret.name)
|
m = self.deck.models.by_name(ret.name)
|
||||||
|
assert m is not None
|
||||||
self.deck.conf["curModel"] = m["id"]
|
self.deck.conf["curModel"] = m["id"]
|
||||||
cdeck = self.deck.decks.current()
|
cdeck = self.deck.decks.current()
|
||||||
cdeck["mid"] = m["id"]
|
cdeck["mid"] = m["id"]
|
||||||
|
|
Loading…
Reference in a new issue