Enable strict_optional for aqt/modelchooser.py (#3539)

* Enable strict_optional

* Fix mypy errors
This commit is contained in:
Ben Nguyen 2024-10-27 21:19:31 -07:00 committed by GitHub
parent fbd53726cc
commit 7f58ca213c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 0 deletions

View file

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

View file

@ -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"]