diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2018-04-16 18:26:05 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2018-04-16 18:26:05 +0900 |
commit | cd90fbde079ac42e930c45fcab509d49205fe54c (patch) | |
tree | fcac2d2304d943ecc07eca1f8d51359e47acaec9 /buildstream/_elementfactory.py | |
parent | ca2331c3f314ff53428b5ca9c8c2efc9d2dbd7cc (diff) | |
download | buildstream-cd90fbde079ac42e930c45fcab509d49205fe54c.tar.gz |
Clean up element/source instantiation code paths.
This removes the extra `kind` parameter from all of the related
codepaths, it is redundant since the `kind` attribute is already
stored on the MetaElement and MetaSource objects.
Diffstat (limited to 'buildstream/_elementfactory.py')
-rw-r--r-- | buildstream/_elementfactory.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/buildstream/_elementfactory.py b/buildstream/_elementfactory.py index bd7c3f240..bc1d95082 100644 --- a/buildstream/_elementfactory.py +++ b/buildstream/_elementfactory.py @@ -42,7 +42,6 @@ class ElementFactory(PluginContext): # objects on demand for a given pipeline. # # Args: - # kind (str): The kind of Element to create # context (object): The Context object for processing # project (object): The project object # artifacts (ArtifactCache): The artifact cache @@ -54,6 +53,6 @@ class ElementFactory(PluginContext): # PluginError (if the kind lookup failed) # LoadError (if the element itself took issue with the config) # - def create(self, kind, context, project, artifacts, meta): - element_type, default_config = self.lookup(kind) + def create(self, context, project, artifacts, meta): + element_type, default_config = self.lookup(meta.kind) return element_type(context, project, artifacts, meta, default_config) |