fix mypy, add types

This commit is contained in:
Victor Shyba 2019-06-09 20:33:18 -03:00 committed by Lex Berezhny
parent 1b5281c23e
commit 9e24f4ca54

View file

@ -2,6 +2,7 @@ import logging
import asyncio
from asyncio import CancelledError
from time import time
from typing import Iterable
from torba.rpc import RPCSession as BaseClientSession, Connector, RPCError
@ -151,8 +152,8 @@ class SessionPool:
def __init__(self, network: BaseNetwork, timeout: float):
self.network = network
self.sessions = []
self._dead_servers = []
self.sessions: Iterable[ClientSession] = []
self._dead_servers: Iterable[ClientSession] = []
self.maintain_connections_task = None
self.timeout = timeout
# triggered when the master server is out, to speed up reconnect