Merge remote-tracking branch 'danielelmes/master' into fix_windows_build
# Conflicts: # CONTRIBUTORS
This commit is contained in:
commit
ba3a84f89a
@ -27,6 +27,7 @@ Yngve Hoiseth <yngve@hoiseth.net>
|
||||
Ijgnd
|
||||
Yoonchae Lee
|
||||
Evandro Coan <github.com/evandrocoan>
|
||||
Alan Du <alanhdu@gmail.com>
|
||||
|
||||
********************
|
||||
|
||||
|
@ -183,7 +183,7 @@ class _Collection:
|
||||
select crt, mod, scm, dty, usn, ls,
|
||||
conf, models, decks, dconf, tags from col"""
|
||||
)
|
||||
self.conf = json.loads(conf) # type: ignore
|
||||
self.conf = json.loads(conf)
|
||||
self.models.load(models)
|
||||
self.decks.load(decks, dconf)
|
||||
self.tags.load(tags)
|
||||
|
@ -152,7 +152,7 @@ def fields_for_rendering(col: anki.storage._Collection, card: Card, note: Note):
|
||||
fields["Type"] = card.note_type()["name"]
|
||||
fields["Deck"] = col.decks.name(card.odid or card.did)
|
||||
fields["Subdeck"] = fields["Deck"].split("::")[-1]
|
||||
fields["Card"] = card.template()["name"] # type: ignore
|
||||
fields["Card"] = card.template()["name"]
|
||||
flag = card.userFlag()
|
||||
fields["CardFlag"] = flag and f"flag{flag}" or ""
|
||||
fields["c%d" % (card.ord + 1)] = "1"
|
||||
|
@ -4,6 +4,10 @@ pretty = false
|
||||
no_strict_optional = true
|
||||
show_error_codes = true
|
||||
check_untyped_defs = true
|
||||
disallow_untyped_decorators = True
|
||||
warn_redundant_casts = True
|
||||
warn_unused_configs = True
|
||||
warn_unused_ignores = True
|
||||
|
||||
[mypy-win32file]
|
||||
ignore_missing_imports = True
|
||||
|
@ -1031,7 +1031,7 @@ class DownloaderInstaller(QObject):
|
||||
self.client = client
|
||||
self.progressSignal.connect(self._progress_callback) # type: ignore
|
||||
|
||||
def bg_thread_progress(up, down):
|
||||
def bg_thread_progress(up, down) -> None:
|
||||
self.progressSignal.emit(up, down) # type: ignore
|
||||
|
||||
self.client.progress_hook = bg_thread_progress
|
||||
|
@ -1515,7 +1515,7 @@ Please ensure a profile is open and Anki is not busy, then try again."""
|
||||
# ensure gc runs in main thread
|
||||
|
||||
def setupDialogGC(self, obj: Any) -> None:
|
||||
obj.finished.connect(lambda: self.gcWindow(obj)) # type: ignore
|
||||
obj.finished.connect(lambda: self.gcWindow(obj))
|
||||
|
||||
def gcWindow(self, obj: Any) -> None:
|
||||
obj.deleteLater()
|
||||
|
@ -115,8 +115,8 @@ class MediaSyncer:
|
||||
def is_syncing(self) -> bool:
|
||||
return self._syncing
|
||||
|
||||
def _on_start_stop(self, running: bool):
|
||||
self.mw.toolbar.set_sync_active(running) # type: ignore
|
||||
def _on_start_stop(self, running: bool) -> None:
|
||||
self.mw.toolbar.set_sync_active(running)
|
||||
|
||||
def show_sync_log(self):
|
||||
aqt.dialogs.open("sync_log", self.mw, self)
|
||||
|
@ -137,7 +137,7 @@ class ProfileManager:
|
||||
def find_class(self, module, name):
|
||||
if module == "PyQt5.sip":
|
||||
try:
|
||||
import PyQt5.sip # type: ignore # pylint: disable=unused-import
|
||||
import PyQt5.sip # pylint: disable=unused-import
|
||||
except:
|
||||
# use old sip location
|
||||
module = "sip"
|
||||
|
@ -18,7 +18,7 @@ Closure = Callable[[], None]
|
||||
class TaskManager(QObject):
|
||||
_closures_pending = pyqtSignal()
|
||||
|
||||
def __init__(self):
|
||||
def __init__(self) -> None:
|
||||
QObject.__init__(self)
|
||||
self._executor = ThreadPoolExecutor()
|
||||
self._closures: List[Closure] = []
|
||||
|
1
qt/i18n/po
Submodule
1
qt/i18n/po
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 785000d3bd0ee43f79c784b1ebf4dec725eb3cee
|
@ -3,6 +3,10 @@ python_version = 3.7
|
||||
pretty = true
|
||||
no_strict_optional = true
|
||||
show_error_codes = true
|
||||
disallow_untyped_decorators = True
|
||||
warn_redundant_casts = True
|
||||
warn_unused_configs = True
|
||||
warn_unused_ignores = True
|
||||
|
||||
[mypy-win32file]
|
||||
ignore_missing_imports = True
|
||||
|
Loading…
Reference in New Issue
Block a user