Skip to content

Commit

Permalink
Add handling for spcial non-void check cases
Browse files Browse the repository at this point in the history
  • Loading branch information
AbrilRBS committed Oct 25, 2023
1 parent 0d5d8ed commit 4bc8636
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions conans/model/version_range.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ def __lt__(self, other):
else:
if other.operator == ">":
return True
# There's a possibility of getting here while validating if a range is non-void
# by comparing >= & <= for lower limit <= upper limit
elif other.operator == "<=":
return True
else:
return self.display_version.pre is not None
return False
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
['<=1.0', "<=1.1", "<=1.0"],
# One lower limit, one upper
['>=1.0', "<2.0", ">=1.0 <2.0"],
['>=1', '<=1', "[>=1 <=1]"],
['>=1', '<=1', ">=1 <=1"],
[">=1", "<=1-", ">=1 <=1-"],
[">=1-", "<=1", ">=1- <=1"],
# Two lower, one upper
['>=1.0', ">1.0 <2.0", ">1.0 <2.0"],
['>=1.0', ">1.1 <2.0", ">1.1 <2.0"],
Expand Down

0 comments on commit 4bc8636

Please sign in to comment.