Represent fixed set of constants as enums
- Dominant language
- Python
- Stars
- 6.4k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
The following properties/attributes could better be represented by an enum type as they are constrained to known values. This would also benefit IDEs and type analyses like mypy
https://github.com/crytic/slither/blob/0ec487460690482c72cacdea6705e2c51bb3981e/slither/core/variables/local_variable.py#L22
https://github.com/crytic/slither/blob/0ec487460690482c72cacdea6705e2c51bb3981e/slither/core/declarations/contract.py#L85
https://github.com/crytic/slither/blob/0ec487460690482c72cacdea6705e2c51bb3981e/slither/core/variables/variable.py#L112
https://github.com/crytic/slither/blob/0ec487460690482c72cacdea6705e2c51bb3981e/slither/core/declarations/function.py#L450
Contributor guide
Assessment
This issue has not been assessed yet.