Skip to content

Commit 26c39f8

Browse files
committed
No inner function, maybe
1 parent 89526cb commit 26c39f8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tdom/processor.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -339,12 +339,12 @@ def _resolve_t_text_ref(
339339
if ref.is_static:
340340
return Text(ref.strings[0])
341341

342-
def to_node(part: str | Interpolation) -> Node:
343-
if isinstance(part, str):
344-
return Text(part)
345-
return _node_from_value(format_interpolation(part))
346-
347-
parts = [to_node(part) for part in _resolve_ref(ref, interpolations)]
342+
parts = [
343+
Text(part)
344+
if isinstance(part, str)
345+
else _node_from_value(format_interpolation(part))
346+
for part in _resolve_ref(ref, interpolations)
347+
]
348348
flat = _flatten_nodes(parts)
349349

350350
if len(flat) == 1 and isinstance(flat[0], Text):

0 commit comments

Comments
 (0)