Repository navigation
Fix #135, convert prerelease and build to string - #140
Merged
Merged
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'
```
Flamefire
reviewed
Sep 30, 2019
Flamefire
left a comment
Contributor
There was a problem hiding this comment.
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
Flamefire
reviewed
Sep 30, 2019
* 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
Member
|
Any news about this PR? Is there a general consensus? |
Member
Author
|
From my side it's ok, 😉 but would @Flamefire approve? 😉 |
Flamefire
approved these changes
Oct 2, 2019
Member
|
Ok. So let's merge it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes #135
Creating
VersionInfo(3, 2, 1, 1)succeeds, but fails later when comparing it with anotherVersionInfoinstance (for example, v1 < v2):