Skip to content

Commit 979770d

Browse files
Fix remaining ruff EM102 on discrete-logarithm ValueError.
1 parent a44abf1 commit 979770d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

maths/baby_step_giant_step.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ def baby_step_giant_step(base: int, target: int, modulus: int) -> int:
8080
return giant_index * step_count + baby_steps[gamma]
8181
gamma = (gamma * giant_factor) % modulus
8282

83-
raise ValueError(f"no discrete logarithm for {target} base {base} modulo {modulus}")
83+
message = f"no discrete logarithm for {target} base {base} modulo {modulus}"
84+
raise ValueError(message)
8485

8586

8687
if __name__ == "__main__":

0 commit comments

Comments
 (0)