Turn on check_untyped_defs for aqt.webview

This commit is contained in:
Matt Krump 2020-07-30 16:49:05 -06:00
parent 215413ce25
commit a56690bc08
3 changed files with 5 additions and 2 deletions

View File

@ -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 *

View File

@ -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))

View File

@ -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