From 61889ed524c9a54e14bd335db871c69abf40f0c2 Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Fri, 20 Apr 2018 14:32:05 +0900 Subject: plugins: Disable attribute-defined-outside-init pylint error Plugins set their attributes in configure(), because the constructor is not public API. --- buildstream/plugins/elements/compose.py | 1 + buildstream/plugins/elements/filter.py | 1 + buildstream/plugins/elements/import.py | 1 + buildstream/plugins/elements/junction.py | 1 + buildstream/plugins/elements/script.py | 2 ++ 5 files changed, 6 insertions(+) (limited to 'buildstream/plugins/elements') diff --git a/buildstream/plugins/elements/compose.py b/buildstream/plugins/elements/compose.py index 0fa79336c..370f19dcf 100644 --- a/buildstream/plugins/elements/compose.py +++ b/buildstream/plugins/elements/compose.py @@ -40,6 +40,7 @@ from buildstream import Element, Scope # Element implementation for the 'compose' kind. class ComposeElement(Element): + # pylint: disable=attribute-defined-outside-init # The compose element's output is it's dependencies, so # we must rebuild if the dependencies change even when diff --git a/buildstream/plugins/elements/filter.py b/buildstream/plugins/elements/filter.py index 2487a9799..1c1a59b76 100644 --- a/buildstream/plugins/elements/filter.py +++ b/buildstream/plugins/elements/filter.py @@ -41,6 +41,7 @@ from buildstream import Element, ElementError, Scope class FilterElement(Element): + # pylint: disable=attribute-defined-outside-init # The filter element's output is it's dependencies, so # we must rebuild if the dependencies change even when diff --git a/buildstream/plugins/elements/import.py b/buildstream/plugins/elements/import.py index dfad178b5..747455d70 100644 --- a/buildstream/plugins/elements/import.py +++ b/buildstream/plugins/elements/import.py @@ -37,6 +37,7 @@ from buildstream import Element, BuildElement, ElementError # Element implementation for the 'import' kind. class ImportElement(BuildElement): + # pylint: disable=attribute-defined-outside-init def configure(self, node): self.source = self.node_subst_member(node, 'source') diff --git a/buildstream/plugins/elements/junction.py b/buildstream/plugins/elements/junction.py index a512222e0..b3f756380 100644 --- a/buildstream/plugins/elements/junction.py +++ b/buildstream/plugins/elements/junction.py @@ -115,6 +115,7 @@ from buildstream._pipeline import PipelineError # Element implementation for the 'junction' kind. class JunctionElement(Element): + # pylint: disable=attribute-defined-outside-init def configure(self, node): self.path = self.node_get_member(node, str, 'path', default='') diff --git a/buildstream/plugins/elements/script.py b/buildstream/plugins/elements/script.py index 7769cd120..6778b3fac 100644 --- a/buildstream/plugins/elements/script.py +++ b/buildstream/plugins/elements/script.py @@ -40,6 +40,8 @@ import buildstream # Element implementation for the 'script' kind. class ScriptElement(buildstream.ScriptElement): + # pylint: disable=attribute-defined-outside-init + def configure(self, node): for n in self.node_get_member(node, list, 'layout', []): dst = self.node_subst_member(n, 'destination') -- cgit v1.2.1