Merge pull request #8 from pacnpal/pixeebot/drip-2025-02-05-pixee-python/fix-dataclass-defaults

Replace `dataclass` Mutable Default Values with Call to `field`
This commit is contained in:
pacnpal
2025-02-12 22:05:02 -05:00
committed by GitHub

View File

@@ -1,7 +1,7 @@
"""Constants for VideoProcessor"""
from typing import Dict, List, Union
from dataclasses import dataclass
from dataclasses import field, dataclass
from enum import Enum
class ReactionType(Enum):
@@ -27,9 +27,9 @@ class ReactionEmojis:
@dataclass(frozen=True)
class ProgressEmojis:
"""Emoji sequences for progress indicators"""
NUMBERS: List[str] = ('1', '2', '3', '4', '5')
PROGRESS: List[str] = ('', '🟨', '🟩')
DOWNLOAD: List[str] = ('0', '2', '4', '6', '8', '🔟')
NUMBERS: List[str] = field(default_factory=lambda: ('1', '2', '3', '4', '5'))
PROGRESS: List[str] = field(default_factory=lambda: ('', '🟨', '🟩'))
DOWNLOAD: List[str] = field(default_factory=lambda: ('0', '2', '4', '6', '8', '🔟'))
# Main reactions dictionary with type hints
REACTIONS: Dict[str, Union[str, List[str]]] = {