MCPcopy Index your code
hub / github.com/python-openxml/python-docx / default

Method default

src/docx/parts/comments.py:38–43  ·  view source on GitHub ↗

A newly created comments part, containing a default empty `w:comments` element.

(cls, package: Package)

Source from the content-addressed store, hash-verified

36
37 @classmethod
38 def default(cls, package: Package) -> Self:
39 """A newly created comments part, containing a default empty `w:comments` element."""
40 partname = PackURI("/word/comments.xml")
41 content_type = CT.WML_COMMENTS
42 element = cast("CT_Comments", parse_xml(cls._default_comments_xml()))
43 return cls(partname, content_type, element, package)
44
45 @classmethod
46 def _default_comments_xml(cls) -> bytes:

Callers

nothing calls this directly

Calls 3

PackURIClass · 0.90
parse_xmlFunction · 0.90
_default_comments_xmlMethod · 0.80

Tested by

no test coverage detected