MCPcopy Index your code
hub / github.com/PyTables/PyTables / _g_maybe_remove

Method _g_maybe_remove

tables/node.py:878–888  ·  view source on GitHub ↗
(
        self, parent: Group, name: str, overwrite: bool
    )

Source from the content-addressed store, hash-verified

876 )
877
878 def _g_maybe_remove(
879 self, parent: Group, name: str, overwrite: bool
880 ) -> None:
881 if name in parent:
882 if not overwrite:
883 raise NodeError(
884 f"destination group ``{parent._v_pathname}`` already "
885 f"has a node named ``{name}``; you may want to use the "
886 f"``overwrite`` argument"
887 )
888 parent._f_get_child(name)._f_remove(True)
889
890 def _g_check_name(self, name: str) -> None:
891 """Check validity of name for this particular kind of node.

Callers 2

_f_moveMethod · 0.95
_f_copyMethod · 0.95

Calls 3

NodeErrorClass · 0.85
_f_get_childMethod · 0.80
_f_removeMethod · 0.45

Tested by

no test coverage detected