From 9deaa857bdc416341353b024895fa5b86c7491aa Mon Sep 17 00:00:00 2001 From: "pixeebot[bot]" <104101892+pixeebot[bot]@users.noreply.github.com> Date: Wed, 5 Feb 2025 03:06:36 +0000 Subject: [PATCH] Replace `dataclass` Mutable Default Values with Call to `field` --- videoarchiver/processor/constants.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/videoarchiver/processor/constants.py b/videoarchiver/processor/constants.py index f200dd4..4606337 100644 --- a/videoarchiver/processor/constants.py +++ b/videoarchiver/processor/constants.py @@ -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]]] = {