You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code uses a string comparison for the version strings latest_version > current_version which yields undesired behavior. Imagine the version numbers 1.2 and 1.15:
1.15 is a higher version than 1.2 but
the comparison will consider 1.2 higher.
To repair this we can change the code
latest_version > current_version
to
[int(i) for i in latest_version.split('.')] > [int(i) for i in current_version.split('.')]
The text was updated successfully, but these errors were encountered:
The code uses a string comparison for the version strings
latest_version > current_version
which yields undesired behavior. Imagine the version numbers 1.2 and 1.15:1.15 is a higher version than 1.2 but
the comparison will consider 1.2 higher.
To repair this we can change the code
latest_version > current_version
to
[int(i) for i in latest_version.split('.')] > [int(i) for i in current_version.split('.')]
The text was updated successfully, but these errors were encountered: