Skip to content

Commit 37e430e

Browse files
Merge branch 'main' into schnellerhase/form-arity
2 parents 8b443ba + 1676aec commit 37e430e

4 files changed

Lines changed: 8 additions & 5 deletions

File tree

test/test_classcoverage.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
from utils import LagrangeElement, MixedElement
66

77
import ufl
8-
from ufl import * # noqa: F403
98
from ufl import (
9+
H1, # noqa: F401
1010
And,
1111
Argument,
1212
CellDiameter,
@@ -116,8 +116,8 @@
116116
all_ufl_classes,
117117
)
118118

119-
has_repr = set()
120-
has_dict = set()
119+
has_repr: set[str] = set()
120+
has_dict: set[str] = set()
121121

122122

123123
def _test_object(a, shape, free_indices):

ufl/algorithms/analysis.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ def extract_type(a, ufl_types, base_form_op_as_expr=None):
6262
"""
6363
if not isinstance(ufl_types, list | tuple):
6464
ufl_types = (ufl_types,)
65+
original_ufl_types = tuple(ufl_types)
6566

6667
if all(t is not BaseFormOperator for t in ufl_types):
6768
remove_base_form_ops = True
@@ -127,7 +128,7 @@ def extract_type(a, ufl_types, base_form_op_as_expr=None):
127128

128129
# `Remove BaseFormOperator` objects if there were initially not in `ufl_types`
129130
if remove_base_form_ops:
130-
objects -= base_form_ops
131+
objects -= {o for o in base_form_ops if not isinstance(o, original_ufl_types)}
131132
return objects
132133

133134

ufl/formatting/ufl2unicode.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ def format_index(ii):
361361
if isinstance(ii, FixedIndex):
362362
s = f"{ii._value}"
363363
elif isinstance(ii, Index):
364-
s = "i{subscript_number(ii._count)}"
364+
s = f"i{subscript_number(ii._count)}"
365365
else:
366366
raise ValueError(f"Invalid index type {type(ii)}.")
367367
return s

ufl/measure.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ def __call__(
287287
subdomain_data=None,
288288
degree=None,
289289
scheme=None,
290+
intersect_measures=None,
290291
):
291292
"""Reconfigure measure with new domain specification or metadata."""
292293
# Let syntax dx() mean integral over everywhere
@@ -324,6 +325,7 @@ def __call__(
324325
domain=domain,
325326
metadata=metadata,
326327
subdomain_data=subdomain_data,
328+
intersect_measures=intersect_measures,
327329
)
328330

329331
def __str__(self):

0 commit comments

Comments
 (0)