From 0a00c89c351af9b74a0b274d2e14422ad5c880c4 Mon Sep 17 00:00:00 2001 From: Benjamin Schubert Date: Fri, 12 Jul 2019 12:20:29 +0100 Subject: plugins: Update public documentation to be correct with the new Nodes We need to update every place where we were passing a yaml 'dict' to now pass a 'MappingNode' --- src/buildstream/element.py | 8 ++++---- src/buildstream/plugin.py | 4 ++-- src/buildstream/source.py | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/buildstream/element.py b/src/buildstream/element.py index 8b4a52e85..570e473e9 100644 --- a/src/buildstream/element.py +++ b/src/buildstream/element.py @@ -493,7 +493,7 @@ class Element(Plugin): in the loaded value with the element contextual variables. Args: - node (dict): A dictionary loaded from YAML + node (:class:`MappingNode `): A MappingNode loaded from YAML member_name (str): The name of the member to fetch default (str): A value to return when *member_name* is not specified in *node* @@ -522,7 +522,7 @@ class Element(Plugin): """Fetch a list from a node member, substituting any variables in the list Args: - node (dict): A dictionary loaded from YAML + node (:class:`MappingNode `): A MappingNode loaded from YAML member_name (str): The name of the member to fetch (a list) Returns: @@ -839,7 +839,7 @@ class Element(Plugin): domain (str): A public domain name to fetch data for Returns: - (dict): The public data dictionary for the given domain + :class:`MappingNode `: The public data dictionary for the given domain .. note:: @@ -861,7 +861,7 @@ class Element(Plugin): Args: domain (str): A public domain name to fetch data for - data (dict): The public data dictionary for the given domain + data (:class:`MappingNode `): The public data dictionary for the given domain This allows an element to dynamically mutate public data of elements or add new domains as the result of success completion diff --git a/src/buildstream/plugin.py b/src/buildstream/plugin.py index ac7b0948e..9a322ab81 100644 --- a/src/buildstream/plugin.py +++ b/src/buildstream/plugin.py @@ -270,7 +270,7 @@ class Plugin(): """Configure the Plugin from loaded configuration data Args: - node (dict): The loaded configuration dictionary + node (:class:`MappingNode `): The loaded configuration dictionary Raises: :class:`.SourceError`: If it's a :class:`.Source` implementation @@ -636,7 +636,7 @@ class Plugin(): # _get_configuring() state is up to date. # # Args: - # node (dict): The loaded configuration dictionary + # node (buildstream.node.MappingNode): The loaded configuration dictionary # def _configure(self, node): self.__configuring = True diff --git a/src/buildstream/source.py b/src/buildstream/source.py index 43957378d..59b6d3644 100644 --- a/src/buildstream/source.py +++ b/src/buildstream/source.py @@ -354,7 +354,7 @@ class Source(Plugin): """Loads the *ref* for this Source from the specified *node*. Args: - node (dict): The YAML node to load the ref from + node (:class:`MappingNode `): The YAML node to load the ref from .. note:: @@ -391,8 +391,8 @@ class Source(Plugin): Args: ref (simple object): The internal source reference to set, or ``None`` - node (dict): The same dictionary which was previously passed - to :func:`Plugin.configure() ` + node (:class:`MappingNode `): The same dictionary which was previously passed + to :func:`Plugin.configure() ` See :func:`Source.get_ref() ` for a discussion on the *ref* parameter. -- cgit v1.2.1