Skip to content

Commit acd2f20

Browse files
committed
Sync RedisVersion with docker release-automation
1 parent 9e6e3d1 commit acd2f20

File tree

1 file changed

+2
-25
lines changed

1 file changed

+2
-25
lines changed

src/redis_release/models.py

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -202,34 +202,11 @@ def __lt__(self, other: "RedisVersion") -> bool:
202202

203203
return self.sort_key < other.sort_key
204204

205-
def __le__(self, other: "RedisVersion") -> bool:
206-
"""Less than or equal comparison."""
207-
if not isinstance(other, RedisVersion):
208-
return NotImplemented
209-
return self < other or self == other
210-
211-
def __gt__(self, other: "RedisVersion") -> bool:
212-
"""Greater than comparison."""
213-
if not isinstance(other, RedisVersion):
214-
return NotImplemented
215-
return not self <= other
216-
217-
def __ge__(self, other: "RedisVersion") -> bool:
218-
"""Greater than or equal comparison."""
219-
if not isinstance(other, RedisVersion):
220-
return NotImplemented
221-
return not self < other
222-
223205
def __eq__(self, other: object) -> bool:
224-
"""Equality comparison."""
225206
if not isinstance(other, RedisVersion):
226207
return NotImplemented
227-
return (
228-
self.major == other.major
229-
and self.minor == other.minor
230-
and (self.patch or 0) == (other.patch or 0)
231-
and self.suffix == other.suffix
232-
)
208+
209+
return self.sort_key == other.sort_key
233210

234211
def __hash__(self) -> int:
235212
"""Hash for use in sets and dicts."""

0 commit comments

Comments
 (0)