Skip to content

Commit dcd5a4f

Browse files
committed
k
1 parent 243bbcc commit dcd5a4f

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

ufl/algorithms/apply_derivatives.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ def process(self, o: Expr) -> Expr:
207207
Processed object.
208208
209209
"""
210-
raise AssertionError(f"UFL expression expected: got {o}")
210+
return super().process(o)
211211

212212
@process.register
213213
def _(self, o: Expr) -> Expr:
@@ -1785,7 +1785,7 @@ def process(self, o: Expr) -> Expr:
17851785
Processed object.
17861786
17871787
"""
1788-
raise AssertionError(f"UFL expression expected: got {o}")
1788+
return super().process(o)
17891789

17901790
@process.register
17911791
def _(self, o: Union[Expr, BaseForm]) -> Union[Expr, BaseForm]:
@@ -2223,7 +2223,7 @@ def process(self, o: Expr) -> Expr:
22232223
Processed object.
22242224
22252225
"""
2226-
raise AssertionError(f"UFL expression expected: got {o}")
2226+
return super().process(o)
22272227

22282228
@process.register
22292229
def _(self, o: Union[Expr, BaseForm]) -> Union[Expr, BaseForm]:

ufl/corealg/dag_traverser.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
"""Base class for dag traversers."""
22

3-
from abc import ABC, abstractmethod
43
from functools import singledispatchmethod, wraps
54
from typing import Union
65

76
from ufl.classes import Expr
87

98

10-
class DAGTraverser(ABC):
9+
class DAGTraverser:
1110
"""Base class for DAG traversers.
1211
1312
Args:
@@ -59,7 +58,6 @@ def __call__(self, node: Expr, *args) -> Expr:
5958
return result
6059

6160
@singledispatchmethod
62-
@abstractmethod
6361
def process(self, node: Expr, *args) -> Expr:
6462
"""Process node by type.
6563
@@ -71,6 +69,7 @@ def process(self, node: Expr, *args) -> Expr:
7169
Processed `Expr`.
7270
7371
"""
72+
raise AssertionError(f"UFL expression expected: got {o}")
7473

7574
def reuse_if_untouched(self, o: Expr) -> Expr:
7675
"""Reuse if touched.

0 commit comments

Comments
 (0)