MCPcopy Create free account
hub / github.com/scanny/python-pptx / _rel_ref_count

Method _rel_ref_count

src/pptx/opc/package.py:428–430  ·  view source on GitHub ↗

Return int count of references in this part's XML to `rId`.

(self, rId: str)

Source from the content-addressed store, hash-verified

426 return self
427
428 def _rel_ref_count(self, rId: str) -> int:
429 """Return int count of references in this part's XML to `rId`."""
430 return len([r for r in cast("list[str]", self._element.xpath("//@r:id")) if r == rId])
431
432
433class PartFactory:

Callers 1

drop_relMethod · 0.95

Calls 1

xpathMethod · 0.45

Tested by

no test coverage detected