(
self, path: str, value: Any, item: Union[QJsonItem, None] = None
)
| 241 | return self.itemFromIndex(indexes[0]) if indexes else None # type: ignore |
| 242 | |
| 243 | def updateValue( |
| 244 | self, path: str, value: Any, item: Union[QJsonItem, None] = None |
| 245 | ) -> bool: |
| 246 | item = item or self.findPath(path) |
| 247 | if item is None: |
| 248 | keys = path.split(QJsonItem.Sep) |
| 249 | self.__loadData(reduce(lambda val, key: {key: val}, reversed(keys), value)) |
| 250 | return True |
| 251 | |
| 252 | return item.updateValue(value) |
| 253 | |
| 254 | def __findItem( |
| 255 | self, key: str, parent=None |
nothing calls this directly
no test coverage detected