(self, key, value)
| 661 | return value |
| 662 | |
| 663 | def __setitem__(self, key, value): |
| 664 | if key != "_box_config" and self._box_config["frozen_box"] and self._box_config["__created"]: |
| 665 | raise BoxError("Box is frozen") |
| 666 | if self.__process_dotted_key(key): |
| 667 | first_item, children = _parse_box_dots(self, key, setting=True) |
| 668 | if first_item in self.keys(): |
| 669 | if hasattr(self[first_item], "__setitem__"): |
| 670 | return self[first_item].__setitem__(children, value) |
| 671 | elif self._box_config["default_box"]: |
| 672 | if children[0] == "[": |
| 673 | super().__setitem__(first_item, box.BoxList(**self.__box_config(extra_namespace=first_item))) |
| 674 | else: |
| 675 | super().__setitem__( |
| 676 | first_item, self._box_config["box_class"](**self.__box_config(extra_namespace=first_item)) |
| 677 | ) |
| 678 | return self[first_item].__setitem__(children, value) |
| 679 | else: |
| 680 | raise BoxKeyError(f"'{self.__class__}' object has no attribute {first_item}") |
| 681 | value = self.__recast(key, value) |
| 682 | if key not in self.keys() and self._box_config["camel_killer_box"]: |
| 683 | if self._box_config["camel_killer_box"] and isinstance(key, str): |
| 684 | key = _camel_killer(key) |
| 685 | if self._box_config["conversion_box"] and self._box_config["box_duplicates"] != "ignore": |
| 686 | self._conversion_checks(key) |
| 687 | self.__convert_and_store(key, value) |
| 688 | |
| 689 | def __setattr__(self, key, value): |
| 690 | if key == "_box_config": |
no test coverage detected