From 10f2f9c037196f5389d784dccc80907005123506 Mon Sep 17 00:00:00 2001 From: Matt Krump <1036969+mkrump@users.noreply.github.com> Date: Thu, 30 Jul 2020 17:54:42 -0600 Subject: [PATCH] Turn on check_untyped_defs for aqt.emptycards --- qt/aqt/emptycards.py | 4 ++-- qt/mypy.ini | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/qt/aqt/emptycards.py b/qt/aqt/emptycards.py index 773d1c650..55b02fb6b 100644 --- a/qt/aqt/emptycards.py +++ b/qt/aqt/emptycards.py @@ -85,10 +85,10 @@ class EmptyCardsDialog(QDialog): self.mw.taskman.run_in_background(delete, on_done) - def _delete_cards(self, keep_notes): + def _delete_cards(self, keep_notes: bool) -> int: to_delete = [] + note: NoteWithEmptyCards for note in self.report.notes: - note: NoteWithEmptyCards = note if keep_notes and note.will_delete_note: # leave first card to_delete.extend(note.card_ids[1:]) diff --git a/qt/mypy.ini b/qt/mypy.ini index 04415f4cd..31cf898b2 100644 --- a/qt/mypy.ini +++ b/qt/mypy.ini @@ -92,3 +92,5 @@ check_untyped_defs=true check_untyped_defs=true [mypy-aqt.addons] check_untyped_defs=true +[mypy-aqt.emptycards] +check_untyped_defs=true