From cd4849f0b8e1e1d5044d1fef369282c16a9a2811 Mon Sep 17 00:00:00 2001 From: "Azalea (on HyDEV-Daisy)" Date: Sun, 23 Oct 2022 01:35:54 -0400 Subject: [PATCH] [F] Fix unhashable type error for RGB --- hyfetch/color_util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hyfetch/color_util.py b/hyfetch/color_util.py index 1cfd6df8..9052d0a2 100644 --- a/hyfetch/color_util.py +++ b/hyfetch/color_util.py @@ -83,7 +83,7 @@ def redistribute_rgb(r: int, g: int, b: int) -> tuple[int, int, int]: return int(gray + x * r), int(gray + x * g), int(gray + x * b) -@dataclass +@dataclass(unsafe_hash=True) class HSL: h: float s: float @@ -96,7 +96,7 @@ class HSL: return RGB(*[round(v * 255.0) for v in colorsys.hls_to_rgb(self.h, self.l, self.s)]) -@dataclass +@dataclass(unsafe_hash=True) class RGB: r: int g: int