(self, key, value)
| 87 | """ |
| 88 | |
| 89 | def __setattr__(self, key, value): |
| 90 | if key == "_box_config" or key in self._box_internal_attrs: |
| 91 | return super().__setattr__(key, value) |
| 92 | |
| 93 | config = self._box_config |
| 94 | if config["__created"] and not config["frozen_box"] and key not in self._protected_keys: |
| 95 | resolved = config["__safe_keys"].get(self._safe_attr(key), key) |
| 96 | if _get_property_func(self, resolved)[1] is None: |
| 97 | if not _existing_destination(self, resolved): |
| 98 | raise BoxKeyError( |
| 99 | f'Cannot create field "{key}" through attribute assignment; use item assignment instead' |
| 100 | ) |
| 101 | |
| 102 | return super().__setattr__(key, value) |
nothing calls this directly
no test coverage detected