(self, key: Key)
| 286 | return cont # type: ignore[no-any-return] |
| 287 | |
| 288 | def append_nest_to_list(self, key: Key) -> None: |
| 289 | cont = self.get_or_create_nest(key[:-1]) |
| 290 | last_key = key[-1] |
| 291 | if last_key in cont: |
| 292 | list_ = cont[last_key] |
| 293 | if not isinstance(list_, list): |
| 294 | raise KeyError("An object other than list found behind this key") |
| 295 | list_.append({}) |
| 296 | else: |
| 297 | cont[last_key] = [{}] |
| 298 | |
| 299 | |
| 300 | class Output: |
no test coverage detected