summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Ipsum <richard.ipsum@codethink.co.uk>2014-11-10 16:53:23 +0000
committerRichard Ipsum <richard.ipsum@codethink.co.uk>2014-11-10 16:53:23 +0000
commit30def38980b27e6fc0822777bee3ef7ea015c3cb (patch)
tree08d911d5009ee33a9edb622447cea19f0549bed5
parent466e31ef99d49d873a330e3e61bf135000ae20e9 (diff)
downloadimport-30def38980b27e6fc0822777bee3ef7ea015c3cb.tar.gz
fix: x<y calls x.__lt__(y)
-rwxr-xr-xexts/pip_find_deps.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/exts/pip_find_deps.py b/exts/pip_find_deps.py
index 9ff540d..fd7533c 100755
--- a/exts/pip_find_deps.py
+++ b/exts/pip_find_deps.py
@@ -88,12 +88,12 @@ class Bound(object):
def __lt__(self, x):
print('__lt__ self: %s, x: %s' % (self, x))
x = self.val(x)
- return x <= self.value if self.inclusive else x < self.value
+ return self.value <= x if self.inclusive else self.value < x
def __gt__(self, x):
print('__gt__ self: %s, x: %s' % (self, x))
x = self.val(x)
- return x >= self.value if self.inclusive else x > self.value
+ return self.value >= x if self.inclusive else self.value > x
def __le__(self, x):
print('__le__ self: %s, x: %s' % (self, x))
@@ -103,7 +103,7 @@ class Bound(object):
def __ge__(self, x):
print('__ge__ self: %s, x: %s' % (self, x))
x = self.val(x)
- return x >= self.value
+ return self.value >= x
def _symbol(self):
return self.symbols[self.bound_type][self.inclusive]