(self, item, value)
| 561 | return out |
| 562 | |
| 563 | def __recast(self, item, value): |
| 564 | if self._box_config["box_recast"] and item in self._box_config["box_recast"]: |
| 565 | recast = self._box_config["box_recast"][item] |
| 566 | try: |
| 567 | if isinstance(recast, type) and issubclass(recast, (Box, box.BoxList)): |
| 568 | return recast(value, **self.__box_config()) |
| 569 | else: |
| 570 | return recast(value) |
| 571 | except ValueError as err: |
| 572 | raise BoxValueError(f"Cannot convert {value} to {recast}") from _exception_cause(err) |
| 573 | return value |
| 574 | |
| 575 | def __convert_and_store(self, item, value): |
| 576 | if self._box_config["conversion_box"]: |
no test coverage detected