mirror of https://github.com/nucypher/nucypher.git
linting
parent
4c984d3fdb
commit
bd8fbc0626
|
@ -268,7 +268,9 @@ class Operator(BaseActor):
|
|||
condition_providers[int(chain_id)] = providers
|
||||
|
||||
domain_chain_ids = tuple(chain.id for chain in self.domain.condition_chains)
|
||||
connected_chain_ids = all(_id in condition_providers for _id in domain_chain_ids)
|
||||
connected_chain_ids = all(
|
||||
_id in condition_providers for _id in domain_chain_ids
|
||||
)
|
||||
if not connected_chain_ids:
|
||||
raise self.ActorError(
|
||||
f"Missing blockchain endpoints for chains: "
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
from unittest import mock
|
||||
|
||||
from copy import copy
|
||||
from unittest import mock
|
||||
from unittest.mock import Mock, patch
|
||||
|
||||
from eth_tester.exceptions import ValidationError
|
||||
from nucypher_core import NodeMetadata
|
||||
from unittest.mock import Mock, patch
|
||||
|
||||
from nucypher.blockchain.eth.signers.software import Web3Signer
|
||||
from nucypher.characters.lawful import Alice, Ursula
|
||||
|
@ -80,7 +80,7 @@ class Vladimir(Ursula):
|
|||
pre_payment_method=bogus_pre_payment_method,
|
||||
condition_blockchain_endpoints={
|
||||
TESTERCHAIN_CHAIN_ID: eth_blockchain.endpoint,
|
||||
}
|
||||
},
|
||||
)
|
||||
|
||||
# Let's use the target's public info, and try to make some changes.
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
|
||||
|
||||
|
||||
from decimal import Decimal, DecimalException
|
||||
from ipaddress import ip_address
|
||||
from pathlib import Path
|
||||
|
||||
import click
|
||||
from cryptography.exceptions import InternalError
|
||||
from decimal import Decimal, DecimalException
|
||||
from eth_utils import to_checksum_address
|
||||
from ipaddress import ip_address
|
||||
from nucypher_core.umbral import PublicKey
|
||||
from pathlib import Path
|
||||
|
||||
from nucypher.blockchain.eth import domains
|
||||
from nucypher.blockchain.eth.token import TToken
|
||||
|
|
|
@ -343,7 +343,9 @@ def light_ursula(temp_dir_path, random_account, mocker):
|
|||
eth_endpoint=MOCK_ETH_PROVIDER_URI,
|
||||
polygon_endpoint=MOCK_ETH_PROVIDER_URI,
|
||||
signer=KeystoreSigner(path=temp_dir_path),
|
||||
condition_blockchain_endpoints={TESTERCHAIN_CHAIN_ID: [MockBlockchain().endpoint]},
|
||||
condition_blockchain_endpoints={
|
||||
TESTERCHAIN_CHAIN_ID: [MockBlockchain().endpoint]
|
||||
},
|
||||
)
|
||||
return ursula
|
||||
|
||||
|
|
|
@ -103,7 +103,7 @@ def test_characters_use_keystore(temp_dir_path, testerchain):
|
|||
pre_payment_method=pre_payment_method,
|
||||
operator_address=testerchain.ursulas_accounts[0],
|
||||
signer=Web3Signer(testerchain.client),
|
||||
condition_blockchain_endpoints={TESTERCHAIN_CHAIN_ID: MOCK_ETH_PROVIDER_URI}
|
||||
condition_blockchain_endpoints={TESTERCHAIN_CHAIN_ID: MOCK_ETH_PROVIDER_URI},
|
||||
)
|
||||
alice.disenchant() # To stop Alice's publication threadpool. TODO: Maybe only start it at first enactment?
|
||||
|
||||
|
@ -175,7 +175,7 @@ def test_ritualist(temp_dir_path, testerchain, dkg_public_key):
|
|||
signer=Web3Signer(testerchain.client),
|
||||
eth_endpoint=MOCK_ETH_PROVIDER_URI,
|
||||
polygon_endpoint=MOCK_ETH_PROVIDER_URI,
|
||||
condition_blockchain_endpoints={TESTERCHAIN_CHAIN_ID: MOCK_ETH_PROVIDER_URI}
|
||||
condition_blockchain_endpoints={TESTERCHAIN_CHAIN_ID: MOCK_ETH_PROVIDER_URI},
|
||||
)
|
||||
|
||||
ritual_id = 23
|
||||
|
|
|
@ -51,7 +51,9 @@ class BaseTestNodeStorageBackends:
|
|||
checksum_address=operator_addresses[i],
|
||||
operator_address=operator_addresses[i],
|
||||
pre_payment_method=pre_payment_method,
|
||||
condition_blockchain_endpoints={TESTERCHAIN_CHAIN_ID: MOCK_ETH_PROVIDER_URI}
|
||||
condition_blockchain_endpoints={
|
||||
TESTERCHAIN_CHAIN_ID: [MOCK_ETH_PROVIDER_URI]
|
||||
},
|
||||
)
|
||||
node_storage.store_node_metadata(node=node)
|
||||
all_known_nodes.add(node)
|
||||
|
|
Loading…
Reference in New Issue