Skip to content

Commit 30ca9e2

Browse files
authored
Apply suggestions from code review
Signed-off-by: Paillat <[email protected]>
1 parent d8cd752 commit 30ca9e2

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

discord/utils.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -102,18 +102,14 @@
102102
DISCORD_EPOCH = 1420070400000
103103

104104

105-
class _MissingSentinel:
106-
def __eq__(self, other) -> bool:
107-
return False
105+
class Undefined(Enum):
106+
MISSING = auto()
108107

109-
def __bool__(self) -> bool:
108+
def __bool__(self) -> Literal[False]:
110109
return False
111110

112-
def __repr__(self) -> str:
113-
return "..."
114-
115111

116-
MISSING: Any = _MissingSentinel()
112+
MISSING: Literal[Undefined.MISSING] = Undefined.MISSING
117113

118114

119115
class _cached_property:

0 commit comments

Comments
 (0)