MCPcopy Index your code
hub / github.com/PyQt5/PyQt / updateValue

Method updateValue

QTreeView/Lib/qjsonmodel.py:243–252  ·  view source on GitHub ↗
(
        self, path: str, value: Any, item: Union[QJsonItem, None] = None
    )

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

findPathMethod · 0.95
__loadDataMethod · 0.95
updateValueMethod · 0.45

Tested by

no test coverage detected