From b2cbe10d7e6753ba9632c651d56c9ab17b588741 Mon Sep 17 00:00:00 2001 From: Matt Krump <1036969+mkrump@users.noreply.github.com> Date: Sat, 25 Jul 2020 16:22:05 -0600 Subject: [PATCH] Turn on check_untyped_defs for aqt.update * Turn on check_untyped_defs for aqt.update --- qt/aqt/update.py | 8 ++++---- qt/mypy.ini | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/qt/aqt/update.py b/qt/aqt/update.py index 5d3bbda0b..8b179f65f 100644 --- a/qt/aqt/update.py +++ b/qt/aqt/update.py @@ -47,18 +47,18 @@ class LatestVersionFinder(QThread): print("update check failed") return if resp["msg"]: - self.newMsg.emit(resp) + self.newMsg.emit(resp) # type: ignore if resp["ver"]: - self.newVerAvail.emit(resp["ver"]) + self.newVerAvail.emit(resp["ver"]) # type: ignore diff = resp["time"] - time.time() if abs(diff) > 300: - self.clockIsOff.emit(diff) + self.clockIsOff.emit(diff) # type: ignore def askAndUpdate(mw, ver): baseStr = _("""

Anki Updated

Anki %s has been released.

""") % ver msg = QMessageBox(mw) - msg.setStandardButtons(QMessageBox.Yes | QMessageBox.No) + msg.setStandardButtons(QMessageBox.Yes | QMessageBox.No) # type: ignore msg.setIcon(QMessageBox.Information) msg.setText(baseStr + _("Would you like to download it now?")) button = QPushButton(_("Ignore this update")) diff --git a/qt/mypy.ini b/qt/mypy.ini index 132d4cfea..11e0b108c 100644 --- a/qt/mypy.ini +++ b/qt/mypy.ini @@ -78,3 +78,5 @@ check_untyped_defs=true check_untyped_defs=true [mypy-aqt.taglimit] check_untyped_defs=true +[mypy-aqt.update] +check_untyped_defs=true