summaryrefslogtreecommitdiff
path: root/src/buildstream/plugin.py
diff options
context:
space:
mode:
authorBenjamin Schubert <ben.c.schubert@gmail.com>2019-06-07 10:16:49 +0100
committerbst-marge-bot <marge-bot@buildstream.build>2019-06-07 16:38:57 +0000
commitbd3765e3874d82581e86c5a4985ba10e9a1bc60e (patch)
tree22d607a3efc72e674f34e26cfecc2d6c13adb46a /src/buildstream/plugin.py
parent8fdb444aa6043fda4ad5cc92d502c4b9b95fa5e9 (diff)
downloadbuildstream-bschubert/stricter-node-api.tar.gz
NEWS: restrict `Plugin.node_items` to be called on `Node`s.bschubert/stricter-node-api
Also update documentation in plugin for APIs that do accept Node and not `dict`.
Diffstat (limited to 'src/buildstream/plugin.py')
-rw-r--r--src/buildstream/plugin.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/buildstream/plugin.py b/src/buildstream/plugin.py
index d8b6a7359..a12ff61ec 100644
--- a/src/buildstream/plugin.py
+++ b/src/buildstream/plugin.py
@@ -358,7 +358,7 @@ class Plugin():
"""Iterate over a dictionary loaded from YAML
Args:
- node (dict): The YAML loaded dictionary object
+ node (Node): The YAML loaded dictionary object
Returns:
list: List of key/value tuples to iterate over
@@ -378,7 +378,7 @@ class Plugin():
for reporting an error or warning.
Args:
- node (dict): The YAML loaded dictionary object
+ node (Node): The YAML loaded dictionary object
member_name (str): The name of the member to check, or None for the node itself
Returns:
@@ -392,7 +392,7 @@ class Plugin():
missing or incorrectly typed.
Args:
- node (dict): A dictionary loaded from YAML
+ node (Node): A dictionary loaded from YAML
expected_type (type): The expected type of the node member
member_name (str): The name of the member to fetch
default (expected_type): A value to return when *member_name* is not specified in *node*