Closed carver closed 3 years ago
Hm, weird. What I wanted to do was:
diff --git a/eth_utils/crypto.py b/eth_utils/crypto.py
index b69343c..ae6e15c 100644
--- a/eth_utils/crypto.py
+++ b/eth_utils/crypto.py
@@ -8,5 +8,4 @@ from .conversions import to_bytes
def keccak(
primitive: Union[bytes, int, bool] = None, hexstr: str = None, text: str = None
) -> bytes:
- input_bytes = to_bytes(primitive, hexstr, text)
- return cast(bytes, keccak_256(input_bytes))
+ return keccak_256(to_bytes(primitive, hexstr, text))
But even when eth-hash is upgraded to v0.3.0, mypy doesn't recognize the type of keccak_256
.
Argh, I missed the touched file eth_hash/py.typed
What was wrong?
Have to cast/ignore the types from eth-hash, because they weren't being executed.
How was it fixed?
Get the latest type exports from eth-hash v0.3.0
To-Do
[x] Clean up commit history
[x] Add entry to the release notes
Cute Animal Picture