edtlib: add 'labels' attribute to Node class
This corresponds to the attribute by the same name in dtlib.Node. Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This commit is contained in:
parent
3b7ddc83d1
commit
7846fd103d
1 changed files with 13 additions and 0 deletions
|
@ -712,6 +712,14 @@ class Node:
|
||||||
The text from the 'label' property on the node, or None if the node has
|
The text from the 'label' property on the node, or None if the node has
|
||||||
no 'label'
|
no 'label'
|
||||||
|
|
||||||
|
labels:
|
||||||
|
A list of all of the devicetree labels for the node, in the same order
|
||||||
|
as the labels appear, but with duplicates removed.
|
||||||
|
|
||||||
|
This corresponds to the actual devicetree source labels, unlike the
|
||||||
|
"label" attribute, which is the value of a devicetree property named
|
||||||
|
"label".
|
||||||
|
|
||||||
parent:
|
parent:
|
||||||
The Node instance for the devicetree parent of the Node, or None if the
|
The Node instance for the devicetree parent of the Node, or None if the
|
||||||
node is the root node
|
node is the root node
|
||||||
|
@ -844,6 +852,11 @@ class Node:
|
||||||
return self._node.props["label"].to_string()
|
return self._node.props["label"].to_string()
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
@property
|
||||||
|
def labels(self):
|
||||||
|
"See the class docstring"
|
||||||
|
return self._node.labels
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def parent(self):
|
def parent(self):
|
||||||
"See the class docstring"
|
"See the class docstring"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue