Turn on check_untyped_defs for aqt.webview
This commit is contained in:
parent
215413ce25
commit
a56690bc08
@ -13,6 +13,7 @@ from PyQt5.Qt import * # type: ignore
|
|||||||
from PyQt5.QtCore import *
|
from PyQt5.QtCore import *
|
||||||
from PyQt5.QtCore import pyqtRemoveInputHook # pylint: disable=no-name-in-module
|
from PyQt5.QtCore import pyqtRemoveInputHook # pylint: disable=no-name-in-module
|
||||||
from PyQt5.QtGui import * # type: ignore
|
from PyQt5.QtGui import * # type: ignore
|
||||||
|
from PyQt5.QtWebChannel import QWebChannel
|
||||||
from PyQt5.QtWebEngineWidgets import *
|
from PyQt5.QtWebEngineWidgets import *
|
||||||
from PyQt5.QtWidgets import *
|
from PyQt5.QtWidgets import *
|
||||||
|
|
||||||
|
@ -30,9 +30,9 @@ class AnkiWebPage(QWebEnginePage):
|
|||||||
self._setupBridge()
|
self._setupBridge()
|
||||||
self.open_links_externally = True
|
self.open_links_externally = True
|
||||||
|
|
||||||
def _setupBridge(self):
|
def _setupBridge(self) -> None:
|
||||||
class Bridge(QObject):
|
class Bridge(QObject):
|
||||||
@pyqtSlot(str, result=str)
|
@pyqtSlot(str, result=str) # type: ignore
|
||||||
def cmd(self, str):
|
def cmd(self, str):
|
||||||
return json.dumps(self.onCmd(str))
|
return json.dumps(self.onCmd(str))
|
||||||
|
|
||||||
|
@ -88,3 +88,5 @@ check_untyped_defs=true
|
|||||||
check_untyped_defs=true
|
check_untyped_defs=true
|
||||||
[mypy-aqt.modelchooser]
|
[mypy-aqt.modelchooser]
|
||||||
check_untyped_defs=true
|
check_untyped_defs=true
|
||||||
|
[mypy-aqt.webview]
|
||||||
|
check_untyped_defs=true
|
||||||
|
Loading…
Reference in New Issue
Block a user