1 parent
744c277123
commit
1e5596b594
10 files changed
+51
-58
No files matched your search
@@ -126,25 +126,25 @@ class OrderedEnum(enum.Enum):
|
||||
# https://github.com/PyCQA/pylint/issues/2306
|
||||
# pylint: disable=comparison-with-callable
|
||||
|
||||
def __ge__(self: ENUM_T, other: ENUM_T) -> bool:
|
||||
def __ge__(self, other: ENUM_T) -> bool:
|
||||
"""Return the greater than element."""
|
||||
if self.__class__ is other.__class__:
|
||||
return bool(self.value >= other.value)
|
||||
return NotImplemented
|
||||
|
||||
def __gt__(self: ENUM_T, other: ENUM_T) -> bool:
|
||||
def __gt__(self, other: ENUM_T) -> bool:
|
||||
"""Return the greater element."""
|
||||
if self.__class__ is other.__class__:
|
||||
return bool(self.value > other.value)
|
||||
return NotImplemented
|
||||
|
||||
def __le__(self: ENUM_T, other: ENUM_T) -> bool:
|
||||
def __le__(self, other: ENUM_T) -> bool:
|
||||
"""Return the lower than element."""
|
||||
if self.__class__ is other.__class__:
|
||||
return bool(self.value <= other.value)
|
||||
return NotImplemented
|
||||
|
||||
def __lt__(self: ENUM_T, other: ENUM_T) -> bool:
|
||||
def __lt__(self, other: ENUM_T) -> bool:
|
||||
"""Return the lower element."""
|
||||
if self.__class__ is other.__class__:
|
||||
return bool(self.value < other.value)
|
||||
|
||||
Reference in new issue
Block a user