update_node#
- NodeTree.update_node(node: Union[Node, str], updates: Dict[str, Any], *, add: bool = False) None [source]#
Update a node in the NodeTree.
Nodes containing wildcards will be resolved but it is not possible to add new nodes with a
node
argument containing wildcards.- Parameters:
node (Union[Node, str]) – Node object or string representation.
updates (Dict[str, Any]) – Data that will be updated (overwrites the existing values).
add (bool) – Flag a non-existing node should be added (default = False).
- Raises:
KeyError – If node does not exist and the
add
Flag is not setValueError – If the node is passed as a string in form of a relative path and no prefix can be added.
- Return type:
None