Bases: str
, Enum
Enum class that inherits from str. This allows for the enum values to be accessed as strings.
Source code in lighter/utils/types/enums.py
| class StrEnum(str, Enum):
"""
Enum class that inherits from str. This allows for the enum values to be accessed as strings.
"""
# Remove this class when Python 3.10 support is dropped, as Python >=3.11 has StrEnum built-in.
def __str__(self) -> str:
return str(self.value)
|