From 9e24f4ca54ba345861a0c4a0ac5f65981e8a9e08 Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Sun, 9 Jun 2019 20:33:18 -0300 Subject: [PATCH] fix mypy, add types --- torba/client/basenetwork.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/torba/client/basenetwork.py b/torba/client/basenetwork.py index 5b4a1203a..7435350d1 100644 --- a/torba/client/basenetwork.py +++ b/torba/client/basenetwork.py @@ -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