mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-27 13:34:28 +00:00
22 lines
391 B
Python
22 lines
391 B
Python
|
import enum
|
||
|
|
||
|
|
||
|
class LeagueRank(enum.Enum):
|
||
|
I = 1
|
||
|
II = 2
|
||
|
III = 3
|
||
|
IV = 4
|
||
|
|
||
|
def __str__(self):
|
||
|
return self.name
|
||
|
|
||
|
def __repr__(self):
|
||
|
return f"{self.__class__.__qualname__}.{self.name}"
|
||
|
|
||
|
def __gt__(self, other):
|
||
|
return self.value < other.value
|
||
|
|
||
|
@classmethod
|
||
|
def from_string(cls, string: str):
|
||
|
return cls.__members__.get(string)
|