- raise TypeError('non-linear expression: {!r}'.format(expr))
- expr = LinExpr(coefficients, constant)
- if not isinstance(expr, cls):
- raise TypeError('cannot convert to a {} instance'.format(cls.__name__))
- return expr
+ raise TypeError('non-linear expression: {!r}'.format(
+ expression))
+ expression = LinExpr(coefficients, constant)
+ if not isinstance(expression, cls):
+ raise TypeError('cannot convert to a {} instance'.format(
+ cls.__name__))
+ return expression