diff --git a/qt/aqt/progress.py b/qt/aqt/progress.py index 0dc73f032..77e2eb5a5 100644 --- a/qt/aqt/progress.py +++ b/qt/aqt/progress.py @@ -73,7 +73,7 @@ class ProgressManager: self._win.setWindowModality(Qt.ApplicationModal) self._win.setMinimumWidth(300) self._setBusy() - self._shown = 0 + self._shown: float = 0 self._counter = min self._min = min self._max = max @@ -116,7 +116,7 @@ class ProgressManager: if process and elapsed >= 0.2: self._updating = True - self.app.processEvents() + self.app.processEvents() # type: ignore #possibly related to https://github.com/python/mypy/issues/6910 self._updating = False self._lastUpdate = time.time() @@ -146,7 +146,7 @@ class ProgressManager: if delta > 0.5: self._showWin() - def _showWin(self): + def _showWin(self) -> None: self._shown = time.time() self._win.show() @@ -160,7 +160,7 @@ class ProgressManager: elap = time.time() - self._shown if elap >= 0.5: break - self.app.processEvents(QEventLoop.ExcludeUserInputEvents) + self.app.processEvents(QEventLoop.ExcludeUserInputEvents) # type: ignore #possibly related to https://github.com/python/mypy/issues/6910 self._win.cancel() self._win = None self._shown = 0 diff --git a/qt/mypy.ini b/qt/mypy.ini index 8efee5828..e1f93a4e2 100644 --- a/qt/mypy.ini +++ b/qt/mypy.ini @@ -98,3 +98,5 @@ check_untyped_defs=true check_untyped_defs=true [mypy-aqt.main] check_untyped_defs=true +[mypy-aqt.progress] +check_untyped_defs=true