From 23498dbebeb243f4f3b2f16bdfb8bcad2733b9fd Mon Sep 17 00:00:00 2001 From: Adam Kelly <338792+aqk@users.noreply.github.com> Date: Tue, 10 Jan 2023 15:42:24 -0800 Subject: [PATCH] Improve param type (#353) --- python-impl/op_swu_g2.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python-impl/op_swu_g2.py b/python-impl/op_swu_g2.py index 287261121..1743dd02f 100644 --- a/python-impl/op_swu_g2.py +++ b/python-impl/op_swu_g2.py @@ -21,6 +21,7 @@ from ec import JacobianPoint, default_ec_twist, eval_iso from fields import Fq, Fq2, roots_of_unity from hash_to_field import Hp2 +from typing import Optional def sgn0(x: Fq2) -> int: @@ -198,7 +199,7 @@ def iso3(P): # # map from Fq2 element(s) to point in G2 subgroup of Ell2 # -def opt_swu2_map(t: Fq2, t2: Fq2 = None) -> JacobianPoint: +def opt_swu2_map(t: Fq2, t2: Optional[Fq2] = None) -> JacobianPoint: Pp = iso3(osswu2_help(t)) if t2 is not None: Pp2 = iso3(osswu2_help(t2))