1
0

qt: add some type hints

This commit is contained in:
SomberNight
2019-09-09 22:19:36 +02:00
parent ef5a5151e3
commit bcdb72ae93
3 changed files with 21 additions and 8 deletions

View File

@@ -28,7 +28,7 @@ import signal
import sys
import traceback
import threading
from typing import Optional
from typing import Optional, TYPE_CHECKING
try:
@@ -57,6 +57,11 @@ from .network_dialog import NetworkDialog
from .stylesheet_patcher import patch_qt_stylesheet
from .lightning_dialog import LightningDialog
if TYPE_CHECKING:
from electrum.daemon import Daemon
from electrum.simple_config import SimpleConfig
from electrum.plugin import Plugins
class OpenFileEventFilter(QObject):
def __init__(self, windows):
@@ -82,7 +87,7 @@ class QNetworkUpdatedSignalObject(QObject):
class ElectrumGui(Logger):
@profiler
def __init__(self, config, daemon, plugins):
def __init__(self, config: 'SimpleConfig', daemon: 'Daemon', plugins: 'Plugins'):
set_language(config.get('language', get_default_language()))
Logger.__init__(self)
# Uncomment this call to verify objects are being properly