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

Method __init__

tables/node.py:202–287  ·  view source on GitHub ↗
(
        self, parentnode: Group | SoftLink, name: str, _log: bool = True
    )

Source from the content-addressed store, hash-verified

200 # The ``_log`` argument is only meant to be used by ``_g_copy_as_child()``
201 # to avoid logging the creation of children nodes of a copied sub-tree.
202 def __init__(
203 self, parentnode: Group | SoftLink, name: str, _log: bool = True
204 ) -> None:
205 # Remember to assign these values in the root group constructor
206 # as it does not use this method implementation!
207
208 # if the parent node is a softlink, dereference it
209 if isinstance(parentnode, class_name_dict["SoftLink"]):
210 parentnode = parentnode.dereference()
211
212 self._v_file = None
213 """The hosting File instance (see :ref:`FileClassDescr`)."""
214
215 self._v_isopen = False
216 """Whether this node is open or not."""
217
218 self._v_pathname = None
219 """The path of this node in the tree (a string)."""
220
221 self._v_name = None
222 """The name of this node in its parent group (a string)."""
223
224 self._v_depth = None
225 """The depth of this node in the tree (an non-negative integer value).
226 """
227
228 self._v_maxtreedepth = parentnode._v_file.params["MAX_TREE_DEPTH"]
229 """Maximum tree depth before warning the user.
230
231 .. versionchanged:: 3.0
232 Renamed into *_v_maxtreedepth* from *_v_maxTreeDepth*.
233
234 """
235
236 self._v__deleting = False
237 """Is the node being deleted?"""
238
239 self._v_objectid = None
240 """A node identifier (may change from run to run).
241
242 .. versionchanged:: 3.0
243 The *_v_objectID* attribute has been renamed into *_v_objectid*.
244
245 """
246
247 validate = new = self._v_new # set by subclass constructor
248
249 # Is the parent node a group? Is it open?
250 self._g_check_group(parentnode)
251 parentnode._g_check_open()
252 file_ = parentnode._v_file
253
254 # Will the file be able to host a new node?
255 if new:
256 file_._check_writable()
257
258 # Bind to the parent node and set location-dependent information.
259 if new:

Callers 1

__init__Method · 0.45

Calls 13

_g_check_groupMethod · 0.95
_g_set_locationMethod · 0.95
_g_createMethod · 0.95
_g_openMethod · 0.95
_g_log_createMethod · 0.95
_g_post_init_hookMethod · 0.95
_f_closeMethod · 0.95
dereferenceMethod · 0.80
_g_check_openMethod · 0.80
_check_writableMethod · 0.80
_g_refnodeMethod · 0.80
_g_newMethod · 0.80

Tested by

no test coverage detected