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