New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #135, convert prerelease and build to string #140
Conversation
Creating VersionInfo(3, 2, 1, 1) succeeds, but fails later when comparing it with another VersionInfo instance (for example, v1 < v2): ``` def split_key(key): > return [convert(c) for c in key.split('.')] E AttributeError: 'int' object has no attribute 'split' ```
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thanks!
What about the other arguments? VersionInfo
expects (int, int, int, str, str)
, so does VersionInfo(10) > VersionInfo('2') == True
hold? Maybe add an assert that the first three are int or None?
To allow VersionInfo(10) > VersionInfo('2') == True
Co-authored-by: Alexander Grund
Co-authored-by: Alexander Grund
* Move assert line to test_should_be_able_to_use_strings_as_major_minor_patch * Add additional assert, comparing VersionInfo created with strings and with integers Co-authored-by: Alexander Grund
Co-authored-by: Alexander Grund
Any news about this PR? Is there a general consensus? |
From my side it's ok, 😉 but would @Flamefire approve? 😉 |
Ok. So let's merge it. |
This PR fixes #135
Creating
VersionInfo(3, 2, 1, 1)
succeeds, but fails later when comparing it with anotherVersionInfo
instance (for example, v1 < v2):