average-vr-56795
04/21/2020, 7:22 PMhundreds-father-404
04/21/2020, 7:27 PMMyEnum.OPTION1.value
is a str
because it could be anything. This is a valid enum:
class Example(Enum):
O1 = 1
O2 = 2
This is also valid:
class Example(Enum):
O1 = "o1"
O2 = "o2"
I think John has been overriding __new__
to get MyPy to be happy. He’s done it in a couple recent PRs. I think ranked_value.py
is the most recent example. Maybe PexDebugLevel
(something like this) too