-
Notifications
You must be signed in to change notification settings - Fork 143
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
Add type hints and clean up ABI code #253
Conversation
…o it can pass these tests
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.
This is a nice improvement, but please consider replacing instances of list
with List[<the element type>]
for further type support. I believe a plain list
is equal to List[Any]
.
You can import List
from the typing
module.
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 am approving the PR as I don't have any beef with it being merged as is. None of my suggestions are mandatory.
* Add type hints and clean up ABI types * Change relative imports to absolute imports * Add type hints for ABI objects * Refactor composer with type hints * Address PR comments, change list type hints, and move type_from_string to ABIType
This PR aims to do some refactoring and clean up so the ABI code has type hints, change some relative imports to absolute imports and makes some minor documentation changes to reflect the newer design.
I also opted to use forward references in some places because we are still on
3.5
for now.