MCPcopy
hub / github.com/psf/black / append_child

Method append_child

src/blib2to3/pytree.py:340–348  ·  view source on GitHub ↗

Equivalent to 'node.children.append(child)'. This method also sets the child's parent attribute appropriately.

(self, child: NL)

Source from the content-addressed store, hash-verified

338 self.invalidate_sibling_maps()
339
340 def append_child(self, child: NL) -> None:
341 """
342 Equivalent to 'node.children.append(child)'. This method also sets the
343 child's parent attribute appropriately.
344 """
345 child.parent = self
346 self.children.append(child)
347 self.changed()
348 self.invalidate_sibling_maps()
349
350 def invalidate_sibling_maps(self) -> None:
351 self.prev_sibling_map: dict[int, NL | None] | None = None

Callers 2

visit_testMethod · 0.80
_normalize_import_fromFunction · 0.80

Calls 3

changedMethod · 0.80
appendMethod · 0.45

Tested by

no test coverage detected