Skip to content

Commit

Permalink
Refactor enums
Browse files Browse the repository at this point in the history
  • Loading branch information
Lekuruu committed Nov 1, 2023
1 parent ce89618 commit 6e466f5
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 5 deletions.
9 changes: 8 additions & 1 deletion constants/__init__.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@

from .status import SubmissionStatus, LegacyStatus, DatabaseStatus
from .beatmap import BeatmapGenre, BeatmapLanguage, BeatmapSortBy
from .permissions import Permissions
from .user import Playstyle
from .modes import GameMode
from .flags import BadFlags
from .grade import Grade
from .mods import Mods

from .beatmap import (
BeatmapLanguage,
BeatmapCategory,
BeatmapSortBy,
BeatmapOrder,
BeatmapGenre
)

from .bancho import (
AvatarExtension,
PresenceFilter,
Expand Down
21 changes: 17 additions & 4 deletions constants/beatmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,20 @@ class BeatmapSortBy(IntEnum):
Artist = 1
Creator = 2
Difficulty = 3
RankedAsc = 4
RankedDesc = 5
Rating = 6
Plays = 7
Ranked = 4
Rating = 5
Plays = 6
Created = 7

class BeatmapCategory(IntEnum):
Any = 0
Leaderboard = 1
Ranked = 2
Qualified = 3
Loved = 4
Approved = 5
Pending = 6

class BeatmapOrder(IntEnum):
Descending = 0
Ascending = 1

0 comments on commit 6e466f5

Please sign in to comment.