Skip to content

Commit eaa9c8f

Browse files
committed
Switch to enum_tools to provide Enums
1 parent 57569c7 commit eaa9c8f

File tree

2 files changed

+2
-35
lines changed

2 files changed

+2
-35
lines changed

domdf_python_tools/enums.py

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -24,39 +24,6 @@
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)

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
aenum>=2.2.3
21
colorama
2+
enum_tools
33
importlib_resources
44
pydash>=4.7.4
55
typing_extensions

0 commit comments

Comments
 (0)