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

Method __getstate__

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

getMethod · 0.80
copyMethod · 0.45
itemsMethod · 0.45

Tested by

no test coverage detected