Skip to content

Conversation

@njgheorghita
Copy link
Contributor

@njgheorghita njgheorghita commented Nov 21, 2019

What was wrong?

Finish type hinting web3.providers

Cute Animal Picture

image

@njgheorghita njgheorghita changed the title Type hints providers Type hints web3.providers Nov 21, 2019
@njgheorghita njgheorghita force-pushed the type-hints-providers branch 14 times, most recently from b023025 to 64a8a0e Compare November 22, 2019 15:47

EMPTY_SHA3_BYTES = HexBytes(b'\0' * 32)
EMPTY_ADDR_HEX = HexAddress('0x' + '00' * 20)
EMPTY_ADDR_HEX = HexAddress(HexStr('0x' + '00' * 20))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't this be HexAddress?


ENS_MAINNET_ADDR = ChecksumAddress(HexAddress('0x314159265dD8dbb310642f98f50C066173C1259b'))
ENS_MAINNET_ADDR = ChecksumAddress(
HexAddress(HexStr('0x314159265dD8dbb310642f98f50C066173C1259b'))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, that's awkward..... that we have to do the double wrap.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I can't say I'm a huge fan. It'll probably be somewhat confusing/frustrating to devs as it breaks their mypys - at least initially, until they get used to the convention. But, I'm not so sure the awkwardness is worth relaxing the HexAddress back to str?

@njgheorghita njgheorghita merged commit 065a1da into ethereum:master Nov 25, 2019
@njgheorghita njgheorghita deleted the type-hints-providers branch November 25, 2019 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants