Skip to content

Commit d09820f

Browse files
committed
installer: call ElementTree.Element with explicit attrib parameter
Type checkers today are unable to determine that `defn` does not contain an `attrib` member, this prevents them from checking our dict would provide compatible data (which is does not). Signed-off-by: Yann Dirson <[email protected]>
1 parent 2a2121b commit d09820f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/installer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def _defn_to_xml_et(defn, /, *, parent=None):
6767
assert isinstance(name, str)
6868
contents = defn.pop('CONTENTS', ())
6969
assert isinstance(contents, (str, list))
70-
element = ET.Element(name, **defn)
70+
element = ET.Element(name, {}, **defn)
7171
if parent is not None:
7272
parent.append(element)
7373
if isinstance(contents, str):

0 commit comments

Comments
 (0)