mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -04:00
add typehint for eventFilter method
This commit is contained in:
parent
eb032c4efb
commit
99663be358
2 changed files with 2 additions and 2 deletions
|
@ -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()
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue