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

Method __add__

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

Source from the content-addressed store, hash-verified

410 self._box_config["__created"] = True
411
412 def __add__(self, other: Mapping[Any, Any]):
413 if not isinstance(other, dict):
414 raise BoxTypeError("Box can only merge two boxes or a box and a dictionary.")
415 new_box = self.copy()
416 new_box.merge_update(other, _force_unfrozen=True) # type: ignore[attr-defined]
417 return new_box
418
419 def __radd__(self, other: Mapping[Any, Any]):
420 if not isinstance(other, dict):

Callers

nothing calls this directly

Calls 3

copyMethod · 0.95
BoxTypeErrorClass · 0.90
merge_updateMethod · 0.45

Tested by

no test coverage detected