From ba6daea7d4adeda5c0fc45819ce25eeb85b8cad1 Mon Sep 17 00:00:00 2001 From: Aayush Kumar Date: Sat, 18 Jan 2025 12:48:15 +0530 Subject: [PATCH] Set `eq=False` in VersionRange and VersionConstraint for the __eq__ method to work Signed-off-by: Aayush Kumar --- src/univers/version_constraint.py | 2 +- src/univers/version_range.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/univers/version_constraint.py b/src/univers/version_constraint.py index 36ec6d81..2f498973 100644 --- a/src/univers/version_constraint.py +++ b/src/univers/version_constraint.py @@ -53,7 +53,7 @@ def operator_star(a, b): @total_ordering -@attr.s(frozen=True, repr=True, str=False, order=False, eq=True, hash=True) +@attr.s(frozen=True, repr=True, str=False, order=False, eq=False, hash=True) class VersionConstraint: """ Represent a single constraint composed of a comparator and a version. diff --git a/src/univers/version_range.py b/src/univers/version_range.py index 69f84f24..33c52b3f 100644 --- a/src/univers/version_range.py +++ b/src/univers/version_range.py @@ -39,7 +39,7 @@ class InvalidVersionRange(Exception): } -@attr.s(frozen=True, order=False, eq=True, hash=True) +@attr.s(frozen=True, order=False, eq=False, hash=True) class VersionRange: """ Base version range class. Subclasses must provide implement.