Refactored Theme class to correspond SOLID patterns
This commit is contained in:
@@ -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]
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user