ethereum / ethereum/execution-specs

Create lint reporting unnecessary casts

Open
#1,284 1 comment 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.