Skip to content

Commit

Permalink
Fix constraints calculation
Browse files Browse the repository at this point in the history
'~=4' is not a valid specifier, however '~=4.0' is.
  • Loading branch information
mdellweg committed Jul 17, 2024
1 parent 575b6e9 commit bbc565e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/github/.ci/scripts/calc_constraints.py.j2
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def to_upper_bound(req):
elif version.minor != 0:
max_version = f"{version.major}.{version.minor-1}"
elif version.major != 0:
max_version = f"{version.major-1}"
max_version = f"{version.major-1}.0"
else:
return f"# NO BETTER CONSTRAINT: {req}"
return f"{requirement.name}{operator}{max_version}"
Expand Down

0 comments on commit bbc565e

Please sign in to comment.