ddht icon indicating copy to clipboard operation
ddht copied to clipboard

Web3 tooling has broken type-checking

Open njgheorghita opened this issue 4 years ago • 0 comments

What was wrong?

The Discovery5Module in the web3 tooling is not being type-checked correctly. The mypy check passes successfully when the attached Methods are missing a type and when the declared type is incorrect.

Code that produced the error

https://github.com/ethereum/ddht/blob/master/ddht/tools/web3.py#L286-L355

Expected Result

Mypy runs should fail when attached methods are missing a type and if the declared type is incorrect.

How can it be fixed?

From https://github.com/ethereum/ddht/pull/224#discussion_r528919231

My guess is that web3.py might be leaking Any which is typically where this type of deficiency shows up.

njgheorghita avatar Nov 24 '20 09:11 njgheorghita