Skip to content

Commit 1948f04

Browse files
committed
Fix flake8 complaint
1 parent ae134ab commit 1948f04

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

docxtpl/template.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
from docx.parts.story import StoryPart
3333
from .subdoc import Subdoc
3434

35-
# _element of docx.document.Document is [CT_Document](https://github.com/python-openxml/python-docx/blob/e45454602b53e8e572b179ccf1c91093ec9f4ed7/src/docx/document.py#L35)
35+
# _element of docx.document.Document is CT_Document
36+
# See: https://github.com/python-openxml/python-docx/blob/master/src/docx/document.py#L35
3637
# But mypy cast it as 'BaseOxmlElement', and will raise 'has no attribute "body"' when calling `self.docx._element.body`
3738
# So we have to use a custom DocumentObject class to reduce unnecessary `type:ignore` marks
3839
class DocumentObject(_DocumentObject):

0 commit comments

Comments
 (0)