Skip to content

Commit 8c6d007

Browse files
SengoldaLulalaby
andauthored
refactor: Purge all un needed __ne__ methods (#2159)
Co-authored-by: Lala Sabathil <[email protected]>
1 parent fc3825b commit 8c6d007

File tree

7 files changed

+0
-30
lines changed

7 files changed

+0
-30
lines changed

discord/activity.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -432,9 +432,6 @@ def to_dict(self) -> dict[str, Any]:
432432
def __eq__(self, other: Any) -> bool:
433433
return isinstance(other, Game) and other.name == self.name
434434

435-
def __ne__(self, other: Any) -> bool:
436-
return not self.__eq__(other)
437-
438435
def __hash__(self) -> int:
439436
return hash(self.name)
440437

@@ -542,9 +539,6 @@ def __eq__(self, other: Any) -> bool:
542539
and other.url == self.url
543540
)
544541

545-
def __ne__(self, other: Any) -> bool:
546-
return not self.__eq__(other)
547-
548542
def __hash__(self) -> int:
549543
return hash(self.name)
550544

@@ -654,9 +648,6 @@ def __eq__(self, other: Any) -> bool:
654648
and other.start == self.start
655649
)
656650

657-
def __ne__(self, other: Any) -> bool:
658-
return not self.__eq__(other)
659-
660651
def __hash__(self) -> int:
661652
return hash(self._session_id)
662653

@@ -829,9 +820,6 @@ def __eq__(self, other: Any) -> bool:
829820
and other.emoji == self.emoji
830821
)
831822

832-
def __ne__(self, other: Any) -> bool:
833-
return not self.__eq__(other)
834-
835823
def __hash__(self) -> int:
836824
return hash((self.name, str(self.emoji)))
837825

discord/colour.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,6 @@ def _get_byte(self, byte: int) -> int:
8686
def __eq__(self, other: Any) -> bool:
8787
return isinstance(other, Colour) and self.value == other.value
8888

89-
def __ne__(self, other: Any) -> bool:
90-
return not self.__eq__(other)
91-
9289
def __str__(self) -> str:
9390
return f"#{self.value:0>6x}"
9491

discord/emoji.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,6 @@ def __repr__(self) -> str:
147147
def __eq__(self, other: Any) -> bool:
148148
return isinstance(other, _EmojiTag) and self.id == other.id
149149

150-
def __ne__(self, other: Any) -> bool:
151-
return not self.__eq__(other)
152-
153150
def __hash__(self) -> int:
154151
return self.id >> 22
155152

discord/flags.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,6 @@ def _from_value(cls, value):
116116
def __eq__(self, other: Any) -> bool:
117117
return isinstance(other, self.__class__) and self.value == other.value
118118

119-
def __ne__(self, other: Any) -> bool:
120-
return not self.__eq__(other)
121-
122119
def __hash__(self) -> int:
123120
return hash(self.value)
124121

discord/member.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -344,9 +344,6 @@ def __repr__(self) -> str:
344344
def __eq__(self, other: Any) -> bool:
345345
return isinstance(other, _UserTag) and other.id == self.id
346346

347-
def __ne__(self, other: Any) -> bool:
348-
return not self.__eq__(other)
349-
350347
def __hash__(self) -> int:
351348
return hash(self._user)
352349

discord/partial_emoji.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,9 +202,6 @@ def __eq__(self, other: Any) -> bool:
202202
return self.id == other.id
203203
return False
204204

205-
def __ne__(self, other: Any) -> bool:
206-
return not self.__eq__(other)
207-
208205
def __hash__(self) -> int:
209206
return hash((self.id, self.name))
210207

discord/user.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,6 @@ def __str__(self) -> str:
123123
def __eq__(self, other: Any) -> bool:
124124
return isinstance(other, _UserTag) and other.id == self.id
125125

126-
def __ne__(self, other: Any) -> bool:
127-
return not self.__eq__(other)
128-
129126
def __hash__(self) -> int:
130127
return self.id >> 22
131128

0 commit comments

Comments
 (0)