MCPcopy Create free account
hub / github.com/cdgriffith/Box / __getstate__

Method __getstate__

box/box.py:941–947  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

939 _comments.del_comment(self, key)
940
941 def __getstate__(self):
942 # Ephemeral-child bookkeeping (a reference to the parent) must never be pickled
943 state = self.__dict__.copy()
944 config = state.get("_box_config")
945 if config is not None and "__pending_parent" in config:
946 state["_box_config"] = {k: v for k, v in config.items() if k != "__pending_parent"}
947 return state
948
949 def __setitem__(self, key, value):
950 if key != "_box_config" and self._box_config["frozen_box"] and self._box_config["__created"]:

Callers

nothing calls this directly

Calls 3

copyMethod · 0.80
getMethod · 0.80
itemsMethod · 0.45

Tested by

no test coverage detected