Skip to content

Typing mismatch when using Integer/int #864

@danrr

Description

@danrr

Similar to #526, I think there are more places where types should use int|Integer or maybe int|IntegerBase in place of only int or Integer.

I think this is the case at least for:

There are probably other cases where int vs Integer is inconsistent but these are the ones that I ran into.

There also appears to be an issue with the order of operands for scalar multiplication. For variables

h: ECCPoint = ...
x: Integer = ...

x * h  # causes mypy to produce: `error: Unsupported operand types for * ("IntegerBase" and "EccPoint")`
h * x  # mypy OK
assert x * h == h * x  # passes

Happy to make a PR for the ones above if that's OK.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions