Skip to content
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

Type hints web3.providers #1520

Merged
merged 3 commits into from
Nov 25, 2019

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
@@ -11,6 +12,6 @@
AUCTION_START_GAS_MARGINAL = 39000

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?

@@ -56,7 +57,9 @@
)


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?

web3/providers/auto.py Show resolved Hide resolved
web3/providers/base.py Show resolved Hide resolved
web3/providers/ipc.py Outdated Show resolved Hide resolved
web3/providers/ipc.py Outdated Show resolved Hide resolved
web3/providers/rpc.py Outdated Show resolved Hide resolved
web3/providers/websocket.py Outdated Show resolved Hide resolved
@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