diff --git a/supervision/detection/line_zone.py b/supervision/detection/line_zone.py index aaa8eec6..870eee07 100644 --- a/supervision/detection/line_zone.py +++ b/supervision/detection/line_zone.py @@ -1,6 +1,6 @@ -from functools import lru_cache import math import warnings +from functools import lru_cache from typing import Any, Dict, Iterable, Tuple import cv2 diff --git a/supervision/draw/color.py b/supervision/draw/color.py index 4422bcb8..b101e0f7 100644 --- a/supervision/draw/color.py +++ b/supervision/draw/color.py @@ -254,12 +254,17 @@ class Color: @classproperty def ROBOFLOW(cls) -> Color: return Color.from_hex("#A351FB") - + def __hash__(self): return hash((self.r, self.g, self.b)) - + def __eq__(self, other): - return isinstance(other, Color) and self.r == other.r and self.g == other.g and self.b == other.b + return ( + isinstance(other, Color) + and self.r == other.r + and self.g == other.g + and self.b == other.b + ) @dataclass