Skip to content

Commit 38f18c7

Browse files
author
Steve Canny
committed
oxml: remove dead _SubElement()
1 parent 769d2bb commit 38f18c7

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

docx/oxml/shared.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
from . import oxml_parser
1414
from .exceptions import ValidationError
15-
from .ns import NamespacePrefixedTag, nsmap, qn
15+
from .ns import NamespacePrefixedTag, qn
1616

1717

1818
# ===========================================================================
@@ -44,10 +44,6 @@ def serialize_for_reading(element):
4444
return XmlString(xml)
4545

4646

47-
def _SubElement(parent, tag):
48-
return etree.SubElement(parent, qn(tag), nsmap=nsmap)
49-
50-
5147
class XmlString(str):
5248
"""
5349
Provides string comparison override suitable for serialized XML that is

tests/test_shape.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import pytest
1010

1111
from docx.enum.shape import WD_INLINE_SHAPE
12-
from docx.oxml.shared import nsmap
12+
from docx.oxml.ns import nsmap
1313
from docx.parts.image import ImagePart
1414
from docx.shape import InlineShape
1515
from docx.shared import Length

0 commit comments

Comments
 (0)