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

Method drop_rel

src/pptx/opc/package.py:409–416  ·  view source on GitHub ↗

Remove relationship identified by `rId` if its reference count is under 2. Relationships with a reference count of 0 are implicit relationships. Note that only XML parts can drop relationships.

(self, rId: str)

Source from the content-addressed store, hash-verified

407 # -- XmlPart cannot set its blob, which is why pyright complains --
408
409 def drop_rel(self, rId: str) -> None:
410 """Remove relationship identified by `rId` if its reference count is under 2.
411
412 Relationships with a reference count of 0 are implicit relationships. Note that only XML
413 parts can drop relationships.
414 """
415 if self._rel_ref_count(rId) < 2:
416 self._rels.pop(rId)
417
418 @property
419 def part(self):

Callers 6

removeMethod · 0.45
_clear_click_actionMethod · 0.45
_remove_hlinkMethod · 0.45
_remove_hlinkClickMethod · 0.45

Calls 2

_rel_ref_countMethod · 0.95
popMethod · 0.80

Tested by 2