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

Method populate_class_members

src/pptx/oxml/xmlchemy.py:506–514  ·  view source on GitHub ↗

Add the appropriate methods to *element_cls*.

(self, element_cls: Type[BaseOxmlElement], prop_name: str)

Source from the content-addressed store, hash-verified

504 """Defines a repeating child element for MetaOxmlElement that must appear at least once."""
505
506 def populate_class_members(self, element_cls: Type[BaseOxmlElement], prop_name: str):
507 """Add the appropriate methods to *element_cls*."""
508 super(OneOrMore, self).populate_class_members(element_cls, prop_name)
509 self._add_list_getter()
510 self._add_creator()
511 self._add_inserter()
512 self._add_adder()
513 self._add_public_adder()
514 delattr(element_cls, prop_name)
515
516 def _add_public_adder(self) -> None:
517 """Add a public `.add_x()` method to the parent element class."""

Callers

nothing calls this directly

Calls 6

_add_public_adderMethod · 0.95
_add_list_getterMethod · 0.80
_add_creatorMethod · 0.80
_add_inserterMethod · 0.80
_add_adderMethod · 0.80

Tested by

no test coverage detected