Skip to content

Commit 9cb30d5

Browse files
authored
Fix: add missing self._localName assignment in xml.dom.minidom.Attr
X-Ref: python/typeshed#8590 (comment) This adds a missing assignment to `_localName`
1 parent 18b1782 commit 9cb30d5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Lib/xml/dom/minidom.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,8 @@ def __init__(self, qName, namespaceURI=EMPTY_NAMESPACE, localName=None,
358358
self._name = qName
359359
self.namespaceURI = namespaceURI
360360
self._prefix = prefix
361+
if localName is not None:
362+
self._localName = localName
361363
self.childNodes = NodeList()
362364

363365
# Add the single child node that represents the value of the attr

0 commit comments

Comments
 (0)