Merge pull request #3533 from bpnguyen107/aqt-strict-optional-overview

Enable strict_optional for aqt/overview.py
This commit is contained in:
Abdo 2024-10-27 17:08:57 +03:00 committed by GitHub
commit d735b4cf00
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View file

@ -44,6 +44,8 @@ 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-anki.scheduler.base]

View file

@ -224,13 +224,14 @@ class Overview:
dyn = ""
return f'<div class="descfont descmid description {dyn}">{desc}</div>'
def _table(self) -> str | None:
def _table(self) -> str:
counts = list(self.mw.col.sched.counts())
current_did = self.mw.col.decks.get_current_id()
deck_node = self.mw.col.sched.deck_due_tree(current_did)
but = self.mw.button
if self.mw.col.v3_scheduler():
assert deck_node is not None
buried_new = deck_node.new_count - counts[0]
buried_learning = deck_node.learn_count - counts[1]
buried_review = deck_node.review_count - counts[2]