diff --git a/qt/aqt/studydeck.py b/qt/aqt/studydeck.py index afa321cb1..493f2307a 100644 --- a/qt/aqt/studydeck.py +++ b/qt/aqt/studydeck.py @@ -75,7 +75,7 @@ class StudyDeck(QDialog): self.redraw("", current) self.exec_() - def eventFilter(self, obj, evt): + def eventFilter(self, obj: QObject, evt: QEvent) -> bool: if evt.type() == QEvent.KeyPress: if evt.key() == Qt.Key_Up: c = self.form.list.count() diff --git a/qt/aqt/webview.py b/qt/aqt/webview.py index 92819d64a..43010d85e 100644 --- a/qt/aqt/webview.py +++ b/qt/aqt/webview.py @@ -227,7 +227,7 @@ class AnkiWebView(QWebEngineView): # type: ignore activated=self.onPaste, ) - def eventFilter(self, obj, evt): + def eventFilter(self, obj: QObject, evt: QEvent) -> bool: # disable pinch to zoom gesture if isinstance(evt, QNativeGestureEvent): return True