fix untyped def issues in aqt/__init__.py

This commit is contained in:
Damien Elmes 2020-08-02 10:16:54 +10:00
parent f1a30c243a
commit 5c176b23c4
2 changed files with 6 additions and 2 deletions

View file

@ -291,7 +291,7 @@ class AnkiApp(QApplication):
sys.stderr.write(sock.errorString())
return
path = bytes(sock.readAll()).decode("utf8")
self.appMsg.emit(path)
self.appMsg.emit(path) # type: ignore
sock.disconnectFromServer()
# OS X file/url handler
@ -299,7 +299,7 @@ class AnkiApp(QApplication):
def event(self, evt):
if evt.type() == QEvent.FileOpen:
self.appMsg.emit(evt.file() or "raise")
self.appMsg.emit(evt.file() or "raise") # type: ignore
return True
return QApplication.event(self, evt)
@ -383,6 +383,9 @@ PROFILE_CODE = os.environ.get("ANKI_PROFILE_CODE")
def write_profile_results():
import cProfile
profiler: cProfile.Profile
profiler.disable()
profiler.dump_stats("anki.prof")
print("profile stats written to anki.prof")

View file

@ -13,6 +13,7 @@ from PyQt5.Qt import * # type: ignore
from PyQt5.QtCore import *
from PyQt5.QtCore import pyqtRemoveInputHook # pylint: disable=no-name-in-module
from PyQt5.QtGui import * # type: ignore
from PyQt5.QtNetwork import QLocalServer, QLocalSocket, QNetworkProxy
from PyQt5.QtWebChannel import QWebChannel
from PyQt5.QtWebEngineWidgets import *
from PyQt5.QtWidgets import *