Skip to content

Commit

Permalink
Fix new version detector
Browse files Browse the repository at this point in the history
Casting each semver component to a integer ensures the _check_version function always works.
  • Loading branch information
tomasvana10 committed Jul 14, 2024
1 parent 17923af commit 2f996d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xpuz/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ def _check_version() -> Union[None, str]:
# Any component of the remote semver'd tag is greater than that of the
# local tag (MAJOR or MINOR or PATCH), meaning a new version has been
# made, so, return the remote version.
if any(item[0] > item[1] for item in list(zip(remote_ver, local_ver))):
if any(int(item[0]) > int(item[1]) for item in list(zip(remote_ver, local_ver))):
return data["name"]

return None # ``response.status`` wasn't 200, meaning some error occurred.
Expand Down

0 comments on commit 2f996d2

Please sign in to comment.