MCPcopy Create free account
hub / github.com/PyTables/PyTables / _g_check_not_contains

Method _g_check_not_contains

tables/node.py:865–876  ·  view source on GitHub ↗
(self, pathname: str)

Source from the content-addressed store, hash-verified

863 )
864
865 def _g_check_not_contains(self, pathname: str) -> None:
866 # The not-a-TARDIS test. ;)
867 mypathname = self._v_pathname
868 if (
869 mypathname == "/" # all nodes fall below the root group
870 or pathname == mypathname
871 or pathname.startswith(mypathname + "/")
872 ):
873 raise NodeError(
874 "can not move or recursively copy node ``%s`` "
875 "into itself" % mypathname
876 )
877
878 def _g_maybe_remove(
879 self, parent: Group, name: str, overwrite: bool

Callers 2

_f_moveMethod · 0.95
_f_copyMethod · 0.95

Calls 1

NodeErrorClass · 0.85

Tested by

no test coverage detected