ethereum / ethereum/execution-specs
Create lint reporting unnecessary casts
Open
A-spec-tools
C-feat
E-hard
P-low
stale
- Dominant language
- Python
- Stars
- 1.2k
- Forks
- 505
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 116
Description
This is only a vague idea. I'm not sure it's strictly necessary, but...
Because we have so many integer types and because we switch between them quite often over time (eg. `Uint` -> `U256`), there could be many places in our codebase where a cast (of the form `b = Uint(0); a: U256 = U256(b)`, not with [`cast()`]) used to be necessary but is no longer required.
Having extra casts lingering around our codebase makes type checking less useful.
[`cast()`]: https://docs.python.org/3/library/typing.html#typing.cast
Contributor guide
Assessment
This issue has not been assessed yet.