Turn on check_untyped_defs for aqt.update
* Turn on check_untyped_defs for aqt.update
This commit is contained in:
parent
7356756868
commit
b2cbe10d7e
@ -47,18 +47,18 @@ class LatestVersionFinder(QThread):
|
|||||||
print("update check failed")
|
print("update check failed")
|
||||||
return
|
return
|
||||||
if resp["msg"]:
|
if resp["msg"]:
|
||||||
self.newMsg.emit(resp)
|
self.newMsg.emit(resp) # type: ignore
|
||||||
if resp["ver"]:
|
if resp["ver"]:
|
||||||
self.newVerAvail.emit(resp["ver"])
|
self.newVerAvail.emit(resp["ver"]) # type: ignore
|
||||||
diff = resp["time"] - time.time()
|
diff = resp["time"] - time.time()
|
||||||
if abs(diff) > 300:
|
if abs(diff) > 300:
|
||||||
self.clockIsOff.emit(diff)
|
self.clockIsOff.emit(diff) # type: ignore
|
||||||
|
|
||||||
|
|
||||||
def askAndUpdate(mw, ver):
|
def askAndUpdate(mw, ver):
|
||||||
baseStr = _("""<h1>Anki Updated</h1>Anki %s has been released.<br><br>""") % ver
|
baseStr = _("""<h1>Anki Updated</h1>Anki %s has been released.<br><br>""") % ver
|
||||||
msg = QMessageBox(mw)
|
msg = QMessageBox(mw)
|
||||||
msg.setStandardButtons(QMessageBox.Yes | QMessageBox.No)
|
msg.setStandardButtons(QMessageBox.Yes | QMessageBox.No) # type: ignore
|
||||||
msg.setIcon(QMessageBox.Information)
|
msg.setIcon(QMessageBox.Information)
|
||||||
msg.setText(baseStr + _("Would you like to download it now?"))
|
msg.setText(baseStr + _("Would you like to download it now?"))
|
||||||
button = QPushButton(_("Ignore this update"))
|
button = QPushButton(_("Ignore this update"))
|
||||||
|
@ -78,3 +78,5 @@ check_untyped_defs=true
|
|||||||
check_untyped_defs=true
|
check_untyped_defs=true
|
||||||
[mypy-aqt.taglimit]
|
[mypy-aqt.taglimit]
|
||||||
check_untyped_defs=true
|
check_untyped_defs=true
|
||||||
|
[mypy-aqt.update]
|
||||||
|
check_untyped_defs=true
|
||||||
|
Loading…
Reference in New Issue
Block a user