Replace dataclass Mutable Default Values with Call to field

This commit is contained in:
pixeebot[bot]
2025-02-05 03:06:36 +00:00
committed by GitHub
parent 4fa93d4472
commit 9deaa857bd

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]]] = {