Web3 tooling has broken type-checking
- Dominant language
- Python
- Stars
- 19
- Forks
- 15
- PR merge metrics
- No merged PRs in 30d
Description
## What was wrong?
The `Discovery5Module` in the web3 tooling is not being type-checked correctly. The mypy check passes successfully when the attached `Method`s 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.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with ddht/tools/web3.py, especially lines 286-355, and inspect how Discovery5Module exposes its attached Methods to mypy. Run the existing mypy checks with a missing type and an incorrect declared type to reproduce the gap. Done means both cases make mypy fail instead of passing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100