| 448 | return new_box |
| 449 | |
| 450 | def __ror__(self, other: Mapping[Any, Any]): |
| 451 | if not isinstance(other, dict): |
| 452 | raise BoxTypeError("Box can only merge two boxes or a box and a dictionary.") |
| 453 | new_box = other.copy() if isinstance(other, Box) else self.__new_from_plain(other) |
| 454 | new_box._box_config["frozen_box"] = False # type: ignore[attr-defined] |
| 455 | new_box.update(self) # type: ignore[attr-defined] |
| 456 | new_box._box_config["frozen_box"] = self._box_config["frozen_box"] # type: ignore[attr-defined] |
| 457 | return new_box |
| 458 | |
| 459 | def __ior__(self, other: Mapping[Any, Any]): # type: ignore[override] |
| 460 | if not isinstance(other, dict): |