mirror of
https://github.com/ankitects/anki.git
synced 2025-09-25 01:06:35 -04:00
move ignore statements for python 3.7
sigh :-( https://github.com/python/mypy/issues/3251#issuecomment-490298556
This commit is contained in:
parent
cc02e95049
commit
3f3a8fc4ab
1 changed files with 6 additions and 6 deletions
|
@ -118,12 +118,12 @@ class AnkiWebView(QWebEngineView): # type: ignore
|
||||||
self.resetHandlers()
|
self.resetHandlers()
|
||||||
self.allowDrops = False
|
self.allowDrops = False
|
||||||
self._filterSet = False
|
self._filterSet = False
|
||||||
QShortcut(
|
QShortcut( # type: ignore
|
||||||
QKeySequence("Esc"),
|
QKeySequence("Esc"),
|
||||||
self,
|
self,
|
||||||
context=Qt.WidgetWithChildrenShortcut,
|
context=Qt.WidgetWithChildrenShortcut,
|
||||||
activated=self.onEsc,
|
activated=self.onEsc,
|
||||||
) # type: ignore
|
)
|
||||||
if isMac:
|
if isMac:
|
||||||
for key, fn in [
|
for key, fn in [
|
||||||
(QKeySequence.Copy, self.onCopy),
|
(QKeySequence.Copy, self.onCopy),
|
||||||
|
@ -131,15 +131,15 @@ class AnkiWebView(QWebEngineView): # type: ignore
|
||||||
(QKeySequence.Cut, self.onCut),
|
(QKeySequence.Cut, self.onCut),
|
||||||
(QKeySequence.SelectAll, self.onSelectAll),
|
(QKeySequence.SelectAll, self.onSelectAll),
|
||||||
]:
|
]:
|
||||||
QShortcut(
|
QShortcut( # type: ignore
|
||||||
key, self, context=Qt.WidgetWithChildrenShortcut, activated=fn
|
key, self, context=Qt.WidgetWithChildrenShortcut, activated=fn
|
||||||
) # type: ignore
|
)
|
||||||
QShortcut(
|
QShortcut( # type: ignore
|
||||||
QKeySequence("ctrl+shift+v"),
|
QKeySequence("ctrl+shift+v"),
|
||||||
self,
|
self,
|
||||||
context=Qt.WidgetWithChildrenShortcut,
|
context=Qt.WidgetWithChildrenShortcut,
|
||||||
activated=self.onPaste,
|
activated=self.onPaste,
|
||||||
) # type: ignore
|
)
|
||||||
|
|
||||||
def eventFilter(self, obj, evt):
|
def eventFilter(self, obj, evt):
|
||||||
# disable pinch to zoom gesture
|
# disable pinch to zoom gesture
|
||||||
|
|
Loading…
Reference in a new issue