Files
remnawave-bedolaga-telegram…/app/services/contests/enums.py
c0mrade 9a2aea038a chore: add uv package manager and ruff linter configuration
- Add pyproject.toml with uv and ruff configuration
- Pin Python version to 3.13 via .python-version
- Add Makefile commands: lint, format, fix
- Apply ruff formatting to entire codebase
- Remove unused imports (base64 in yookassa/simple_subscription)
- Update .gitignore for new config files
2026-01-24 17:45:27 +03:00

46 lines
1.1 KiB
Python

"""Enum classes for contest system."""
from enum import Enum
class GameType(str, Enum):
"""Types of daily contest games."""
QUEST_BUTTONS = 'quest_buttons'
LOCK_HACK = 'lock_hack'
LETTER_CIPHER = 'letter_cipher'
SERVER_LOTTERY = 'server_lottery'
BLITZ_REACTION = 'blitz_reaction'
EMOJI_GUESS = 'emoji_guess'
ANAGRAM = 'anagram'
@classmethod
def is_text_input(cls, game_type: 'GameType') -> bool:
"""Check if game requires text input from user."""
return game_type in {cls.LETTER_CIPHER, cls.EMOJI_GUESS, cls.ANAGRAM}
@classmethod
def is_button_pick(cls, game_type: 'GameType') -> bool:
"""Check if game uses button selection."""
return game_type in {
cls.QUEST_BUTTONS,
cls.LOCK_HACK,
cls.SERVER_LOTTERY,
cls.BLITZ_REACTION,
}
class RoundStatus(str, Enum):
"""Contest round status."""
ACTIVE = 'active'
FINISHED = 'finished'
class PrizeType(str, Enum):
"""Types of prizes for contests."""
DAYS = 'days'
BALANCE = 'balance'
CUSTOM = 'custom'