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

Method _g_post_init_hook

tables/leaf.py:400–418  ·  view source on GitHub ↗

Code to be run after node creation and before creation logging. This method gets or sets the flavor of the leaf.

(self)

Source from the content-addressed store, hash-verified

398 )
399
400 def _g_post_init_hook(self) -> None:
401 """Code to be run after node creation and before creation logging.
402
403 This method gets or sets the flavor of the leaf.
404
405 """
406 super()._g_post_init_hook()
407 if self._v_new: # set flavor of new node
408 if self._flavor is None:
409 self._flavor = internal_flavor
410 else: # flavor set at creation time, do not log
411 if self._v_file.params["PYTABLES_SYS_ATTRS"]:
412 self._v_attrs._g__setattr("FLAVOR", self._flavor)
413 else: # get flavor of existing node (if any)
414 if self._v_file.params["PYTABLES_SYS_ATTRS"]:
415 flavor = getattr(self._v_attrs, "FLAVOR", internal_flavor)
416 self._flavor = flavor_alias_map.get(flavor, flavor)
417 else:
418 self._flavor = internal_flavor
419
420 def _calc_chunkshape(
421 self, expectedrows: int, rowsize: int, itemsize: int

Callers 1

__init__Method · 0.45

Calls 2

_g__setattrMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected