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

Method __add__

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

Source from the content-addressed store, hash-verified

310 self._box_config["__created"] = True
311
312 def __add__(self, other: Mapping[Any, Any]):
313 if not isinstance(other, dict):
314 raise BoxTypeError("Box can only merge two boxes or a box and a dictionary.")
315 new_box = self.copy()
316 new_box.merge_update(other, _force_unfrozen=True) # type: ignore[attr-defined]
317 return new_box
318
319 def __radd__(self, other: Mapping[Any, Any]):
320 if not isinstance(other, dict):

Callers

nothing calls this directly

Calls 3

copyMethod · 0.95
BoxTypeErrorClass · 0.90
merge_updateMethod · 0.80

Tested by

no test coverage detected