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

Method _gather_image_parts

src/docx/package.py:38–47  ·  view source on GitHub ↗

Load the image part collection with all the image parts in package.

(self)

Source from the content-addressed store, hash-verified

36 return ImageParts()
37
38 def _gather_image_parts(self):
39 """Load the image part collection with all the image parts in package."""
40 for rel in self.iter_rels():
41 if rel.is_external:
42 continue
43 if rel.reltype != RT.IMAGE:
44 continue
45 if rel.target_part in self.image_parts:
46 continue
47 self.image_parts.append(cast("ImagePart", rel.target_part))
48
49
50class ImageParts:

Callers 1

after_unmarshalMethod · 0.95

Calls 2

iter_relsMethod · 0.80
appendMethod · 0.80

Tested by

no test coverage detected