Skip to content

Commit 82c59b4

Browse files
committed
Fixes parsing related regressions
1 parent a32dbb1 commit 82c59b4

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

_delb/builder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ def handle_tag_end(self, data: TagEventData | None) -> TagNodeType:
251251
if __debug__ and data:
252252
assert result.namespace == data.namespace
253253
assert result.local_name == data.local_name
254-
if data.attributes is not None:
254+
if data.attributes:
255255
assert result.attributes == data.attributes
256256

257257
children = self.children.pop()

_delb/plugins/expat_parser.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,7 @@ def characters(self, content: str):
4949
def endElementNS( # noqa: N802
5050
self, name: tuple[None | str, str], qname: str | None
5151
):
52-
self.events.append(
53-
(EventType.TagEnd, TagEventData(name[0] or "", name[1], None))
54-
)
52+
self.events.append((EventType.TagEnd, TagEventData(name[0] or "", name[1], {})))
5553

5654
def ignorableWhitespace(self, whitespace: str): # noqa: N802
5755
raise InvalidCodePath

0 commit comments

Comments
 (0)