Skip to content

Commit 24fd1f7

Browse files
author
Bilal Al
committed
polish
1 parent 1252e29 commit 24fd1f7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

splitio/models/grammar/matchers/semver.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def set_major_minor_and_patch(self, version):
6161
"""
6262

6363
parts = version.split(self._VALUE_DELIMITER)
64-
if len(parts) != 3 or not ( parts[0].isnumeric() and parts[1].isnumeric() and parts[2].isnumeric()):
64+
if len(parts) != 3 or not (parts[0].isnumeric() and parts[1].isnumeric() and parts[2].isnumeric()):
6565
raise RuntimeError("Unable to convert to Semver, incorrect format: " + version)
6666

6767
self._major = int(parts[0])
@@ -73,7 +73,7 @@ def compare(self, to_compare):
7373
Compare the current Semver object to a given Semver object, return:
7474
0: if self == passed
7575
1: if self > passed
76-
2: if self < passed
76+
-1: if self < passed
7777
7878
:param to_compare: a Semver object
7979
:type to_compare: splitio.models.grammar.matchers.semver.Semver
@@ -121,7 +121,7 @@ def _compare_vars(self, var1, var2):
121121
Compare 2 variables and return int as follows:
122122
0: if var1 == var2
123123
1: if var1 > var2
124-
2: if var1 < var2
124+
-1: if var1 < var2
125125
126126
:param var1: any object accept ==, < or > operators
127127
:type var1: str/int

0 commit comments

Comments
 (0)