Closed hukkin closed 2 years ago
Hey @Deniallugo is mypy something that you want in this project? I'm asking because it took some time and effort to make it pass initially, and now after the latest changes there are pretty big merge conflicts (and mypy errors after fixing those), which I don't want to get into fixing if this isn't something you want merged.
My 5 cents is that mypy
is pretty important and it's better to have it. The final decision is up to @Deniallugo though.
Sorry, for the big gap. I think, that mypy is really important for this product. So, please use it everywhere
@Deniallugo :+1: I fixed all the conflicts
I do not know but it looks like the some library interface has been changed/updated.
from eth_account.signers.base import BaseAccount now accepts only SignableMessage type. Let looking for fix
Sorry. Looks strange because of: message = encode_defunct(message.encode())
must be type of SignableMessage
Fixed the mypy error. It's not a change in the API. It's just that eth_account
didn't distribute type data before the latest version so mypy was not as strict here before.
I got the same issue with the test_is_public_key_onset. Currently I can't get the point why it's failed
Locally it's working fine
fail of test_is_public_key_onset
occurs randomly but as far as I can see it depends on timeout and execution flow.
Closes https://github.com/zksync-sdk/zksync-python/issues/13
Fixes the
make mypy
andtox -e mypy
invocations, which used to run unittests, now run mypy. Fixes all mypy errors.