summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaphaël Barrois <raphael.barrois@polyconseil.fr>2018-06-18 13:06:11 +0200
committerRaphaël Barrois <raphael.barrois@polyconseil.fr>2018-06-18 13:06:11 +0200
commitbed41d6c9d6be1f35e5134e08b88c20f1772d364 (patch)
tree4c02ffb758b4795f64b89e746f0b2e5f6ba3d847
parent543299ebb0a73c9ee513ac1165ed3732aaa8c94f (diff)
downloadsemantic-version-bed41d6c9d6be1f35e5134e08b88c20f1772d364.tar.gz
Don't use `is` for integer comparisons.
Closes #65. Reported-By: Julian Berman <julian@grayvines.com>
-rw-r--r--semantic_version/base.py4
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(