File tree Expand file tree Collapse file tree 2 files changed +2
-35
lines changed Expand file tree Collapse file tree 2 files changed +2
-35
lines changed Original file line number Diff line number Diff line change 2424#
2525
2626# 3rd party
27- from aenum import Enum , IntEnum # type: ignore
27+ from enum_tools import IntEnum , StrEnum
2828
2929__all__ = ["IntEnum" , "StrEnum" ]
30-
31- # class IntEnum(Enum):
32- # """
33- # An Enum that can be converted into an integer.
34- # """
35- #
36- # def __int__(self):
37- # return self.value
38- #
39- # def __eq__(self, other):
40- # if int(self) == other:
41- # return True
42- # else:
43- # return super().__eq__(other)
44-
45-
46- class StrEnum (str , Enum ):
47- """
48- An Enum that can be converted into a string.
49- """
50-
51- def __str__ (self ) -> str :
52- return self .value
53-
54- #
55- # def __repr__(self):
56- # return self.value
57-
58- # def __eq__(self, other):
59- # if str(self) == other:
60- # return True
61- # else:
62- # return super().__eq__(other)
Original file line number Diff line number Diff line change 1- aenum >= 2.2.3
21colorama
2+ enum_tools
33importlib_resources
44pydash >= 4.7.4
55typing_extensions
You can’t perform that action at this time.
0 commit comments