Skip to content

Commit a27a00f

Browse files
committed
Reduce LOC changes
1 parent c7122d5 commit a27a00f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/reactpy/utils.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -156,24 +156,24 @@ def _etree_to_vdom(
156156
return el
157157

158158

159-
def _add_vdom_to_etree(parent: etree._Element, node: VdomDict | dict[str, Any]) -> None:
159+
def _add_vdom_to_etree(parent: etree._Element, vdom: VdomDict | dict[str, Any]) -> None:
160160
try:
161-
tag = node["tagName"]
161+
tag = vdom["tagName"]
162162
except KeyError as e:
163-
msg = f"Expected a VDOM dict, not {type(node)}"
163+
msg = f"Expected a VDOM dict, not {type(vdom)}"
164164
raise TypeError(msg) from e
165165
else:
166-
node = cast(VdomDict, node)
166+
vdom = cast(VdomDict, vdom)
167167

168168
if tag:
169169
element = etree.SubElement(parent, tag)
170170
element.attrib.update(
171-
_vdom_attr_to_html_str(k, v) for k, v in node.get("attributes", {}).items()
171+
_vdom_attr_to_html_str(k, v) for k, v in vdom.get("attributes", {}).items()
172172
)
173173
else:
174174
element = parent
175175

176-
for c in node.get("children", []):
176+
for c in vdom.get("children", []):
177177
if hasattr(c, "render"):
178178
c = _component_to_vdom(cast(ComponentType, c))
179179
if isinstance(c, dict):

0 commit comments

Comments
 (0)