mirror of
https://github.com/283375/arcaea-offline.git
synced 2025-04-21 15:00:18 +00:00
feat(utils): rating_class (int) to str
This commit is contained in:
parent
9b7d06a2f9
commit
f493abacf6
@ -0,0 +1,23 @@
|
||||
from typing import Optional
|
||||
|
||||
RATING_CLASS_TEXT_MAP = {
|
||||
0: "Past",
|
||||
1: "Present",
|
||||
2: "Future",
|
||||
3: "Beyond",
|
||||
}
|
||||
|
||||
RATING_CLASS_SHORT_TEXT_MAP = {
|
||||
0: "PST",
|
||||
1: "PRS",
|
||||
2: "FTR",
|
||||
3: "BYD",
|
||||
}
|
||||
|
||||
|
||||
def rating_class_to_text(rating_class: int) -> Optional[str]:
|
||||
return RATING_CLASS_TEXT_MAP.get(rating_class)
|
||||
|
||||
|
||||
def rating_class_to_short_text(rating_class: int) -> Optional[str]:
|
||||
return RATING_CLASS_SHORT_TEXT_MAP.get(rating_class)
|
Loading…
x
Reference in New Issue
Block a user