mirror of
https://github.com/ankitects/anki.git
synced 2025-12-13 06:46:55 -05:00
fix untyped def issues in aqt/__init__.py
This commit is contained in:
parent
f1a30c243a
commit
5c176b23c4
2 changed files with 6 additions and 2 deletions
|
|
@ -291,7 +291,7 @@ class AnkiApp(QApplication):
|
||||||
sys.stderr.write(sock.errorString())
|
sys.stderr.write(sock.errorString())
|
||||||
return
|
return
|
||||||
path = bytes(sock.readAll()).decode("utf8")
|
path = bytes(sock.readAll()).decode("utf8")
|
||||||
self.appMsg.emit(path)
|
self.appMsg.emit(path) # type: ignore
|
||||||
sock.disconnectFromServer()
|
sock.disconnectFromServer()
|
||||||
|
|
||||||
# OS X file/url handler
|
# OS X file/url handler
|
||||||
|
|
@ -299,7 +299,7 @@ class AnkiApp(QApplication):
|
||||||
|
|
||||||
def event(self, evt):
|
def event(self, evt):
|
||||||
if evt.type() == QEvent.FileOpen:
|
if evt.type() == QEvent.FileOpen:
|
||||||
self.appMsg.emit(evt.file() or "raise")
|
self.appMsg.emit(evt.file() or "raise") # type: ignore
|
||||||
return True
|
return True
|
||||||
return QApplication.event(self, evt)
|
return QApplication.event(self, evt)
|
||||||
|
|
||||||
|
|
@ -383,6 +383,9 @@ PROFILE_CODE = os.environ.get("ANKI_PROFILE_CODE")
|
||||||
|
|
||||||
|
|
||||||
def write_profile_results():
|
def write_profile_results():
|
||||||
|
import cProfile
|
||||||
|
|
||||||
|
profiler: cProfile.Profile
|
||||||
profiler.disable()
|
profiler.disable()
|
||||||
profiler.dump_stats("anki.prof")
|
profiler.dump_stats("anki.prof")
|
||||||
print("profile stats written to anki.prof")
|
print("profile stats written to anki.prof")
|
||||||
|
|
|
||||||
|
|
@ -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.QtNetwork import QLocalServer, QLocalSocket, QNetworkProxy
|
||||||
from PyQt5.QtWebChannel import QWebChannel
|
from PyQt5.QtWebChannel import QWebChannel
|
||||||
from PyQt5.QtWebEngineWidgets import *
|
from PyQt5.QtWebEngineWidgets import *
|
||||||
from PyQt5.QtWidgets import *
|
from PyQt5.QtWidgets import *
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue