Skip to content

Commit 4f1584a

Browse files
committed
fix: extra whitespace and other linting issues
1 parent 484e86d commit 4f1584a

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/blindfold/blindfold.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ def __init__(self: Cluster, cluster: dict):
267267

268268
if len(cluster['nodes']) < 1:
269269
raise ValueError('cluster configuration must contain at least one node')
270-
270+
271271
self.update(cluster)
272272

273273
class Operations(dict):
@@ -817,7 +817,7 @@ def generate( # pylint: disable=arguments-differ # Seeds not supported.
817817
)
818818

819819
_validate_key_attributes(cluster, operations, threshold)
820-
820+
821821
cluster_key = _Key({'cluster': cluster, 'operations': operations})
822822
cluster_key.__class__ = ClusterKey # Constructor disabled to mirror TypeScript.
823823
if threshold is not None:
@@ -934,9 +934,9 @@ def generate(secret_key: SecretKey) -> PublicKey:
934934
...
935935
TypeError: secret key expected
936936
"""
937-
# No internal validation of the supplied secret key is performed
938-
# beyond what is necessary for the generation of this public key.
939-
# It is also assumed that the encapsulated key from the Paillier
937+
# No internal validation of the supplied secret key is performed
938+
# beyond what is necessary for the generation of this public key.
939+
# It is also assumed that the encapsulated key from the Paillier
940940
# cryptosystem library has valid internal structure.
941941

942942
if not isinstance(secret_key, SecretKey):
@@ -960,7 +960,6 @@ def dump(self: PublicKey) -> dict:
960960
instance. This method complements the :obj:`load` method.
961961
"""
962962
return {
963-
'material': {},
964963
'cluster': self['cluster'],
965964
'operations': self['operations'],
966965

@@ -1262,7 +1261,10 @@ def encrypt(
12621261
# divided by four to determine the length of its hex representation.
12631262
# The ciphertext is then padded to always have the same length (in case
12641263
# the underlying integer happens to have a shorter representation).
1265-
return ciphertext.zfill((SecretKey._paillier_prime_bit_length * 4) // 4)
1264+
return ciphertext.zfill(
1265+
# pylint: disable=protected-access
1266+
(SecretKey._paillier_prime_bit_length * 4) // 4
1267+
)
12661268

12671269
# For multiple-node clusters and no threshold, additive secret sharing is used.
12681270
if 'threshold' not in key:

0 commit comments

Comments
 (0)