mypy/isort fixes

This commit is contained in:
Damien Elmes 2020-05-04 15:21:03 +10:00
parent fd4406222a
commit ce104d16a3

View file

@ -3,8 +3,7 @@
import collections import collections
import re import re
from operator import itemgetter from operator import itemgetter
from typing import Optional from typing import List, Optional
from typing import List
import aqt.clayout import aqt.clayout
from anki import stdmodels from anki import stdmodels
@ -203,7 +202,7 @@ class AddModel(QDialog):
for m in sorted(self.col.models.all(), key=itemgetter("name")): for m in sorted(self.col.models.all(), key=itemgetter("name")):
item = QListWidgetItem(_("Clone: %s") % m["name"]) item = QListWidgetItem(_("Clone: %s") % m["name"])
self.dialog.models.addItem(item) self.dialog.models.addItem(item)
self.models.append((False, m)) self.models.append((False, m)) # type: ignore
self.dialog.models.setCurrentRow(0) self.dialog.models.setCurrentRow(0)
# the list widget will swallow the enter key # the list widget will swallow the enter key
s = QShortcut(QKeySequence("Return"), self) s = QShortcut(QKeySequence("Return"), self)