Avoid breaking line by `\` if possible
@@ -161,9 +161,8 @@ class TestArrayElementwiseOp(unittest.TestCase):
@testing.numpy_cupy_allclose(accept_error=TypeError)
def check_array_array_op(self, op, xp, x_type, y_type,
no_complex=False, no_bool=False):
- if no_complex:
- if numpy.dtype(x_type).kind == 'c' \
- or numpy.dtype(y_type).kind == 'c':
+ if no_complex and (numpy.dtype(x_type).kind == 'c' or
+ numpy.dtype(y_type).kind == 'c'):
return xp.array(True)
if no_bool and (numpy.dtype(x_type) == '?' and
numpy.dtype(y_type) == '?'):
@@ -268,9 +267,8 @@ class TestArrayElementwiseOp(unittest.TestCase):
@testing.numpy_cupy_allclose(accept_error=TypeError)
def check_array_broadcasted_op(self, op, xp, x_type, y_type,
no_complex=False, no_bool=False):
- if no_complex:
- if numpy.dtype(x_type).kind == 'c' \
- or numpy.dtype(y_type).kind == 'c':
+ if no_complex and (numpy.dtype(x_type).kind == 'c' or
+ numpy.dtype(y_type).kind == 'c'):
return xp.array(True)
if no_bool and (numpy.dtype(x_type) == '?' and
numpy.dtype(y_type) == '?'):
@@ -381,9 +379,8 @@ class TestArrayElementwiseOp(unittest.TestCase):
@testing.numpy_cupy_allclose()
def check_array_doubly_broadcasted_op(self, op, xp, x_type, y_type,
no_complex=False, no_bool=False):
- if no_complex:
- if numpy.dtype(x_type).kind == 'c' \
- or numpy.dtype(y_type).kind == 'c':
+ if no_complex and (numpy.dtype(x_type).kind == 'c' or
+ numpy.dtype(y_type).kind == 'c'):
return x_type(True)
if no_bool and (numpy.dtype(x_type) == '?' and
numpy.dtype(y_type) == '?'):
