Skip to content

Commit

Permalink
Added 'eq=False' to '@attr.s' decorator in VersionConstraint and Vers…
Browse files Browse the repository at this point in the history
…ionConstraint, for __eq__ method to take effect. Fixes issue #43

Signed-off-by: Aayush Kumar <[email protected]>
  • Loading branch information
aayushkdev committed Jan 17, 2025
1 parent 9c15915 commit 79bbafe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/univers/version_constraint.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/univers/version_range.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 79bbafe

Please sign in to comment.