Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if self.__class__ is other.__class__:
return self.value > other.value
return NotImplemented
def __le__(self, other):
if self.__class__ is other.__class__:
return self.value <= other.value
return NotImplemented
def __lt__(self, other):
if self.__class__ is other.__class__:
return self.value < other.value
return NotImplemented
class Rank(OrderedEnum):
NO_RANK = 7
SPECIES = 6
GENUS = 5
FAMILY = 4
ORDER = 3
CLASS = 2
PHYLUM = 1
KINGDOM = 0
str2rank = {
'species': Rank.SPECIES,
'genus': Rank.GENUS,
'family': Rank.FAMILY,
'order': Rank.ORDER,
'class': Rank.CLASS,