Skip to content

Commit 88a935f

Browse files
committed
Lint codes with 4 spaces
1 parent 6afa150 commit 88a935f

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

src/pyscipopt/expr.pxi

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -326,26 +326,26 @@ cdef class ExprCons:
326326
def __richcmp__(self, other, op):
327327
'''turn it into a constraint'''
328328
if op == 1: # <=
329-
if not self._rhs is None:
330-
raise TypeError('ExprCons already has upper bound')
331-
assert not self._lhs is None
329+
if not self._rhs is None:
330+
raise TypeError('ExprCons already has upper bound')
331+
assert not self._lhs is None
332332

333-
if not _is_number(other):
334-
raise TypeError('Ranged ExprCons is not well defined!')
333+
if not _is_number(other):
334+
raise TypeError('Ranged ExprCons is not well defined!')
335335

336-
return ExprCons(self.expr, lhs=self._lhs, rhs=float(other))
336+
return ExprCons(self.expr, lhs=self._lhs, rhs=float(other))
337337
elif op == 5: # >=
338-
if not self._lhs is None:
339-
raise TypeError('ExprCons already has lower bound')
340-
assert self._lhs is None
341-
assert not self._rhs is None
338+
if not self._lhs is None:
339+
raise TypeError('ExprCons already has lower bound')
340+
assert self._lhs is None
341+
assert not self._rhs is None
342342

343-
if not _is_number(other):
344-
raise TypeError('Ranged ExprCons is not well defined!')
343+
if not _is_number(other):
344+
raise TypeError('Ranged ExprCons is not well defined!')
345345

346-
return ExprCons(self.expr, lhs=float(other), rhs=self._rhs)
346+
return ExprCons(self.expr, lhs=float(other), rhs=self._rhs)
347347
else:
348-
raise TypeError
348+
raise NotImplementedError("Ranged ExprCons can only support with '<=' or '>='.")
349349

350350
def __repr__(self):
351351
return 'ExprCons(%s, %s, %s)' % (self.expr, self._lhs, self._rhs)

0 commit comments

Comments
 (0)