Skip to content

Commit cec75de

Browse files
committed
Linting
1 parent 2363ea2 commit cec75de

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

pySDC/implementations/datatype_classes/firedrake_mesh.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ def __rmul__(self, other):
6464
me = firedrake_mesh(self)
6565
me.functionspace.assign(other * self.functionspace)
6666
return me
67-
except TypeError:
68-
raise DataError("Type error: cannot multiply %s to %s" % (type(other), type(self)))
67+
except TypeError as e:
68+
raise DataError("Type error: cannot multiply %s to %s" % (type(other), type(self))) from e
6969

7070
def __abs__(self):
7171
"""

pySDC/tests/test_datatypes/test_firedrake_mesh.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ def test_subtraction(n=3, v1=1, v2=2):
4747
@pytest.mark.firedrake
4848
def test_right_multiplication(n=3, v1=1, v2=2):
4949
from pySDC.implementations.datatype_classes.firedrake_mesh import firedrake_mesh
50+
from pySDC.core.errors import DataError
5051
import numpy as np
5152
import firedrake as fd
5253

@@ -63,6 +64,11 @@ def test_right_multiplication(n=3, v1=1, v2=2):
6364
assert np.allclose(b.dat._numpy_data, v1 * v2)
6465
assert np.allclose(a.dat._numpy_data, v1)
6566

67+
try:
68+
'Dat kölsche Dom' * b
69+
except DataError:
70+
pass
71+
6672

6773
@pytest.mark.firedrake
6874
def test_norm(n=3, v1=-1):

0 commit comments

Comments
 (0)