Skip to content

Conversation

@algochoi
Copy link
Contributor

@algochoi algochoi commented Nov 24, 2021

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.

@algochoi algochoi self-assigned this Nov 24, 2021
@algochoi algochoi requested a review from tzaffi November 24, 2021 16:39
@algochoi algochoi marked this pull request as ready for review November 24, 2021 16:39
Copy link
Contributor

@jasonpaulos jasonpaulos left a 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.

Copy link
Contributor

@tzaffi tzaffi left a 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.

@algochoi algochoi merged commit 0f521d0 into develop Nov 24, 2021
@algochoi algochoi deleted the algochoi/abi-type-hints branch November 24, 2021 21:11
aldur pushed a commit that referenced this pull request Feb 8, 2022
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants