diff options
author | Raphaël Barrois <raphael.barrois@polyconseil.fr> | 2018-06-18 13:06:11 +0200 |
---|---|---|
committer | Raphaël Barrois <raphael.barrois@polyconseil.fr> | 2018-06-18 13:06:11 +0200 |
commit | bed41d6c9d6be1f35e5134e08b88c20f1772d364 (patch) | |
tree | 4c02ffb758b4795f64b89e746f0b2e5f6ba3d847 /semantic_version/base.py | |
parent | 543299ebb0a73c9ee513ac1165ed3732aaa8c94f (diff) | |
download | semantic-version-bed41d6c9d6be1f35e5134e08b88c20f1772d364.tar.gz |
Don't use `is` for integer comparisons.
Closes #65.
Reported-By: Julian Berman <julian@grayvines.com>
Diffstat (limited to 'semantic_version/base.py')
-rw-r--r-- | semantic_version/base.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/semantic_version/base.py b/semantic_version/base.py index 5f16f96..ed7b87a 100644 --- a/semantic_version/base.py +++ b/semantic_version/base.py @@ -91,13 +91,13 @@ class Version(object): return int(value) def next_major(self): - if self.prerelease and self.minor is 0 and self.patch is 0: + if self.prerelease and self.minor == 0 and self.patch == 0: return Version('.'.join(str(x) for x in [self.major, self.minor, self.patch])) else: return Version('.'.join(str(x) for x in [self.major + 1, 0, 0])) def next_minor(self): - if self.prerelease and self.patch is 0: + if self.prerelease and self.patch == 0: return Version('.'.join(str(x) for x in [self.major, self.minor, self.patch])) else: return Version( |