eth-educators / ethstaker-deposit-cli

Secure key generation for deposits
https://eth-educators.github.io/ethstaker-deposit-cli/
Creative Commons Zero v1.0 Universal
5 stars 10 forks source link

Resolve ignored mypy type check errors #10

Open valefar-on-discord opened 7 months ago

valefar-on-discord commented 7 months ago

There are a number of mypy type checking errors that are a result from integration with https://github.com/ethereum/py-ssz/tree/main

I spent some time trying to resolve these but it felt like fighting a hydra. At this point they are ignored with either # type: ignore[no-untyped-call], # type: ignore[no-untyped-call], or # type: ignore[attr-defined]

Here is the current list of errors:

staking_deposit/utils/ssz.py:42: error: Call to untyped function "ForkData" in typed context  [no-untyped-call]
staking_deposit/utils/ssz.py:86: error: Call to untyped function "SigningData" in typed context  [no-untyped-call]
staking_deposit/credentials.py:118: error: Call to untyped function "DepositMessage" in typed context  [no-untyped-call]
staking_deposit/credentials.py:128: error: Call to untyped function "DepositData" in typed context  [no-untyped-call]
staking_deposit/credentials.py:129: error: Call to untyped function "as_dict" in typed context  [no-untyped-call]
staking_deposit/credentials.py:141: error: Call to untyped function "as_dict" in typed context  [no-untyped-call]
staking_deposit/credentials.py:168: error: Call to untyped function "BLSToExecutionChange" in typed context  [no-untyped-call]
staking_deposit/credentials.py:180: error: Call to untyped function "SignedBLSToExecutionChange" in typed context  [no-untyped-call]
staking_deposit/credentials.py:189: error: "SignedBLSToExecutionChange" has no attribute "message"  [attr-defined]
staking_deposit/credentials.py:190: error: "SignedBLSToExecutionChange" has no attribute "message"  [attr-defined]
staking_deposit/credentials.py:191: error: "SignedBLSToExecutionChange" has no attribute "message"  [attr-defined]
staking_deposit/credentials.py:194: error: "SignedBLSToExecutionChange" has no attribute "signature"  [attr-defined]
staking_deposit/utils/validation.py:92: error: Call to untyped function "DepositMessage" in typed context  [no-untyped-call]
staking_deposit/utils/validation.py:99: error: Call to untyped function "DepositData" in typed context  [no-untyped-call]
staking_deposit/utils/validation.py:192: error: Call to untyped function "BLSToExecutionChange" in typed context  [no-untyped-call]
valefar-on-discord commented 7 months ago

https://github.com/ethereum/py-ssz/issues/8

yorickdowne commented 3 months ago

https://github.com/pallets/click/issues/2626