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

Method __or__

box/box.py:441–448  ·  view source on GitHub ↗
(self, other: Mapping[Any, Any])

Source from the content-addressed store, hash-verified

439 return self
440
441 def __or__(self, other: Mapping[Any, Any]):
442 if not isinstance(other, dict):
443 raise BoxTypeError("Box can only merge two boxes or a box and a dictionary.")
444 new_box = self.copy()
445 new_box._box_config["frozen_box"] = False
446 new_box.update(other) # type: ignore[attr-defined]
447 new_box._box_config["frozen_box"] = self._box_config["frozen_box"]
448 return new_box
449
450 def __ror__(self, other: Mapping[Any, Any]):
451 if not isinstance(other, dict):

Callers

nothing calls this directly

Calls 3

copyMethod · 0.95
BoxTypeErrorClass · 0.90
updateMethod · 0.45

Tested by

no test coverage detected