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

Method __setstate__

box/box_list.py:432–440  ·  view source on GitHub ↗
(self, state)

Source from the content-addressed store, hash-verified

430 return copyreg.__newobj__, (self.__class__,), state
431
432 def __setstate__(self, state):
433 if "items" not in state:
434 # Pickled by Box 7 or earlier: the items were already appended
435 self.__dict__.update(state)
436 return
437 self.__init__(state["items"], **state["box_options"])
438 for name in ("_box_comments", "_box_comments_document"):
439 if name in state:
440 self.__dict__[name] = state[name]
441
442 def __hash__(self) -> int: # type: ignore[override]
443 if self.box_options.get("frozen_box"):

Callers

nothing calls this directly

Calls 2

__init__Method · 0.95
updateMethod · 0.45

Tested by

no test coverage detected