1
0

more type annotations in core lib

This commit is contained in:
SomberNight
2018-10-22 16:41:25 +02:00
parent 6958c0ccc3
commit 81cc20039e
14 changed files with 90 additions and 49 deletions

View File

@@ -28,7 +28,7 @@ import ssl
import sys
import traceback
import asyncio
from typing import Tuple, Union, List
from typing import Tuple, Union, List, TYPE_CHECKING
from collections import defaultdict
import aiorpcx
@@ -43,6 +43,9 @@ from . import blockchain
from .blockchain import Blockchain
from . import constants
if TYPE_CHECKING:
from .network import Network
class NotificationSession(ClientSession):
@@ -129,7 +132,7 @@ def serialize_server(host: str, port: Union[str, int], protocol: str) -> str:
class Interface(PrintError):
def __init__(self, network, server, config_path, proxy):
def __init__(self, network: 'Network', server: str, config_path, proxy: dict):
self.ready = asyncio.Future()
self.got_disconnected = asyncio.Future()
self.server = server