| 457 | return new_box |
| 458 | |
| 459 | def __ror__(self, other: Mapping[Any, Any]): |
| 460 | if not isinstance(other, dict): |
| 461 | raise BoxTypeError("Box can only merge two boxes or a box and a dictionary.") |
| 462 | new_box = other.copy() if isinstance(other, Box) else self.__new_from_plain(other) |
| 463 | new_box._box_config["frozen_box"] = False # type: ignore[attr-defined] |
| 464 | new_box.update(self) # type: ignore[attr-defined] |
| 465 | new_box._box_config["frozen_box"] = self._box_config["frozen_box"] # type: ignore[attr-defined] |
| 466 | return new_box |
| 467 | |
| 468 | def __ior__(self, other: Mapping[Any, Any]): # type: ignore[override] |
| 469 | if not isinstance(other, dict): |