MCPcopy Index your code
hub / github.com/rawpython/remi / remove_child

Method remove_child

remi/gui.py:494–509  ·  view source on GitHub ↗

Removes a child instance from the Tag's children. Args: child (Tag): The child to be removed.

(self, child)

Source from the content-addressed store, hash-verified

492 self.remove_child(self.children[k])
493
494 def remove_child(self, child):
495 """Removes a child instance from the Tag's children.
496
497 Args:
498 child (Tag): The child to be removed.
499 """
500 if child in self.children.values() and hasattr(child, 'identifier'):
501 for k in self.children.keys():
502 if hasattr(self.children[k], 'identifier'):
503 if self.children[k].identifier == child.identifier:
504 if k in self._render_children_list:
505 self._render_children_list.remove(k)
506 self.children.pop(k)
507 # when the child is removed we stop the iteration
508 # this implies that a child replication should not be allowed
509 break
510
511
512class Widget(Tag, EventSource):

Callers 7

emptyMethod · 0.95
remove_childMethod · 0.45
remove_childMethod · 0.45
set_row_countMethod · 0.45
set_column_countMethod · 0.45
populate_folder_itemsMethod · 0.45
chdirMethod · 0.45

Calls 1

popMethod · 0.80

Tested by

no test coverage detected