From b137ebbc76e0b649acc92d169e8afd0e8401805e Mon Sep 17 00:00:00 2001 From: Kieran Prasch Date: Fri, 21 Sep 2018 12:01:50 -0700 Subject: [PATCH] Resolve typing ImportError in policy --- nucypher/blockchain/eth/policies.py | 2 +- nucypher/utilities/sandbox/policy.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/nucypher/blockchain/eth/policies.py b/nucypher/blockchain/eth/policies.py index 98e40fb15..42b7c1178 100644 --- a/nucypher/blockchain/eth/policies.py +++ b/nucypher/blockchain/eth/policies.py @@ -114,7 +114,7 @@ class BlockchainPolicy(Policy): def __find_ursulas(self, ether_addresses: List[str], target_quantity: int, timeout: int = 120): start_time = maya.now() # Marker for timeout calculation - found_ursulas, unknown_addresses = set(), deque() # type: Tuple[set, deque] + found_ursulas, unknown_addresses = set(), deque() # type: set, deque while len(found_ursulas) < target_quantity: # Check for a timeout diff --git a/nucypher/utilities/sandbox/policy.py b/nucypher/utilities/sandbox/policy.py index 6c67bc582..c571727a9 100644 --- a/nucypher/utilities/sandbox/policy.py +++ b/nucypher/utilities/sandbox/policy.py @@ -1,5 +1,5 @@ from collections import OrderedDict -from typing import List +from typing import List, Set import maya @@ -34,7 +34,9 @@ class MockPolicy(Policy): hrac=self.hrac(), expiration=expiration) - self.consider_arrangement(network_middleware=network_middleware, arrangement=arrangement) + self.consider_arrangement(network_middleware=network_middleware, + ursula=ursula, + arrangement=arrangement) class MockPolicyCreation: