-
Notifications
You must be signed in to change notification settings - Fork 83
Type Hinting For py_ecc module #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
37bed92
to
3aa880b
Compare
@pipermerriam I have added the type hinting for the
|
3aa880b
to
0af83a7
Compare
Looks good to me! |
int_types = (int, long) # noqa: F821 | ||
else: | ||
int_types = (int,) | ||
sys.setrecursionlimit(10000) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be updated to be sys.setrecursionlimit(max(10000, sys.getrecursionlimit))
to ensure that this doesn't lower the recursion limit.
@@ -39,52 +40,54 @@ def inv(a, n): | |||
# A class for field elements in FQ. Wrap a number in this class, | |||
# and it becomes a field element. | |||
class FQ(object): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if this shouldn't inherit from int
or numbers.Number
. I think that it might simplify the typing (maybe) since each of the methods argument types that are currently Union[int, "FQ")
could be reduced to just be int
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pipermerriam that would involve refactoring the whole codebase, and maybe we can open a new issue once we are done with this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove travis config
Fixes #11