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

@@ -164,12 +164,12 @@ class Network(PrintError):
"""
verbosity_filter = 'n'
def __init__(self, config=None):
def __init__(self, config: SimpleConfig=None):
global INSTANCE
INSTANCE = self
if config is None:
config = {} # Do not use mutables as default values!
self.config = SimpleConfig(config) if isinstance(config, dict) else config
self.config = SimpleConfig(config) if isinstance(config, dict) else config # type: SimpleConfig
self.num_server = 10 if not self.config.get('oneserver') else 0
blockchain.blockchains = blockchain.read_blockchains(self.config)
self.print_error("blockchains", list(blockchain.blockchains))