Refactored Theme class to correspond SOLID patterns

This commit is contained in:
Vladyslav Hroshev
2025-04-10 18:29:19 +03:00
parent 31e1a3deb9
commit 40a88cb7f4
26 changed files with 534 additions and 252 deletions

View File

View File

@@ -0,0 +1,11 @@
from dataclasses import dataclass
from typing import Literal
InstallationMode = Literal["light", "dark"]
@dataclass
class InstallationColor:
hue: int
saturation: int | None
modes: list[InstallationMode]

View File

@@ -0,0 +1,12 @@
from abc import ABC
class ThemeBase(ABC):
"""Base class for theme installation and preparation."""
@staticmethod
def prepare(self):
pass
@staticmethod
def install(self, hue: int, sat: float | None = None):
pass