Closed jonasnick closed 7 months ago
For the first couple errors regarding "tuple[int, int] | None" for variable R0, since we checked is_infinity(R0) which is checking whether R0 is None, R0 cannot be None in these lines. So I just gave mypy a type hint to ignore the type of R0 since it would always be tuple[int, int]
Fixed other issues with type assertion and adopted the suggestion for changing the return type to Union
Running the Mypy typechecker reveals some errors in
reference.py
:Besides fixing these issues, we should also return a different type of
as
Optional[Point]
is also used the denote the type of "affine" Point or Point at infinity. I'd suggest to useUnion[bool, Point]
(documentation)