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

Method _load_serialized_parts

src/docx/opc/pkgreader.py:45–55  ·  view source on GitHub ↗

Return a list of |_SerializedPart| instances corresponding to the parts in `phys_reader` accessible by walking the relationship graph starting with `pkg_srels`.

(phys_reader, pkg_srels, content_types)

Source from the content-addressed store, hash-verified

43
44 @staticmethod
45 def _load_serialized_parts(phys_reader, pkg_srels, content_types):
46 """Return a list of |_SerializedPart| instances corresponding to the parts in
47 `phys_reader` accessible by walking the relationship graph starting with
48 `pkg_srels`."""
49 sparts = []
50 part_walker = PackageReader._walk_phys_parts(phys_reader, pkg_srels)
51 for partname, blob, reltype, srels in part_walker:
52 content_type = content_types[partname]
53 spart = _SerializedPart(partname, content_type, reltype, blob, srels)
54 sparts.append(spart)
55 return tuple(sparts)
56
57 @staticmethod
58 def _srels_for(phys_reader, source_uri):

Callers 1

from_fileMethod · 0.45

Calls 3

_SerializedPartClass · 0.85
appendMethod · 0.80
_walk_phys_partsMethod · 0.45

Tested by

no test coverage detected