Skip to content

Commit de9141c

Browse files
committed
formatting fixups
1 parent 7426df8 commit de9141c

File tree

2 files changed

+12
-17
lines changed

2 files changed

+12
-17
lines changed

src/ecdsa/test_jacobi.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -666,15 +666,9 @@ def test_mul_add_with_doubled_negation_of_itself(self):
666666
self.assertEqual(j_g.mul_add(4, dbl_neg, 2), INFINITY)
667667

668668
@given(
669-
st.integers(
670-
min_value=0, max_value=int(generator_112r2.order() - 1)
671-
),
672-
st.integers(
673-
min_value=0, max_value=int(generator_112r2.order() - 1)
674-
),
675-
st.integers(
676-
min_value=0, max_value=int(generator_112r2.order() - 1)
677-
)
669+
st.integers(min_value=0, max_value=int(generator_112r2.order() - 1)),
670+
st.integers(min_value=0, max_value=int(generator_112r2.order() - 1)),
671+
st.integers(min_value=0, max_value=int(generator_112r2.order() - 1)),
678672
)
679673
@example(693, 2, 3293) # values that will hit all the conditions for NAF
680674
def test_mul_add_random(self, mul1, mul2, mul3):
@@ -893,6 +887,7 @@ def interrupter(barrier_start, barrier_end, lock_exit):
893887

894888
class TestZeroCurve(unittest.TestCase):
895889
"""Tests with curve that has (0, 0) on the curve."""
890+
896891
def setUp(self):
897892
self.curve = CurveFp(23, 1, 0)
898893

src/ecdsa/test_pyecdsa.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -856,18 +856,18 @@ def test_hybrid_decoding_with_blocked_format(self):
856856

857857
self.assertIn("Invalid X9.62 encoding", str(exp.exception))
858858

859-
def test_hybrid_decoding_with_inconsistent_encoding_and_no_validation(self):
859+
def test_hybrid_decoding_with_inconsistent_encoding_and_no_validation(
860+
self,
861+
):
860862
sk = SigningKey.from_secret_exponent(123456789)
861863
vk = sk.verifying_key
862864

863865
enc = vk.to_string("hybrid")
864-
self.assertEqual(enc[:1], b'\x06')
865-
enc = b'\x07' + enc[1:]
866+
self.assertEqual(enc[:1], b"\x06")
867+
enc = b"\x07" + enc[1:]
866868

867869
b = VerifyingKey.from_string(
868-
enc,
869-
valid_encodings=("hybrid",),
870-
validate_point=False
870+
enc, valid_encodings=("hybrid",), validate_point=False
871871
)
872872

873873
self.assertEqual(vk, b)
@@ -919,8 +919,8 @@ def test_decoding_with_inconsistent_hybrid_odd_point(self):
919919
vk = sk.verifying_key
920920

921921
enc = vk.to_string("hybrid")
922-
self.assertEqual(enc[:1], b'\x07')
923-
enc = b'\x06' + enc[1:]
922+
self.assertEqual(enc[:1], b"\x07")
923+
enc = b"\x06" + enc[1:]
924924

925925
with self.assertRaises(MalformedPointError):
926926
b = VerifyingKey.from_string(enc, valid_encodings=("hybrid",))

0 commit comments

Comments
 (0)