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