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

Method _part_cls_for

src/docx/opc/part.py:199–204  ·  view source on GitHub ↗

Return the custom part class registered for `content_type`, or the default part class if no custom class is registered for `content_type`.

(cls, content_type: str)

Source from the content-addressed store, hash-verified

197
198 @classmethod
199 def _part_cls_for(cls, content_type: str):
200 """Return the custom part class registered for `content_type`, or the default
201 part class if no custom class is registered for `content_type`."""
202 if content_type in cls.part_type_for:
203 return cls.part_type_for[content_type]
204 return cls.default_part_type
205
206
207class XmlPart(Part):

Callers 1

__new__Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected