You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by no...@apache.org on 2020/12/29 12:52:09 UTC

[buildstream] 02/03: Add pylint exceptions

This is an automated email from the ASF dual-hosted git repository.

not-in-ldap pushed a commit to branch 239-use-pylint-for-linting
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit 6044a88a398a8603013c2324056336f6727e738a
Author: Tristan Maat <tr...@codethink.co.uk>
AuthorDate: Thu Feb 8 18:15:06 2018 +0000

    Add pylint exceptions
---
 buildstream/_fuse/fuse.py             | 2 ++
 buildstream/_plugincontext.py         | 4 ++--
 buildstream/_signals.py               | 4 ++--
 buildstream/plugin.py                 | 2 +-
 buildstream/sandbox/_sandboxchroot.py | 2 +-
 5 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/buildstream/_fuse/fuse.py b/buildstream/_fuse/fuse.py
index 89173ba..58febcb 100644
--- a/buildstream/_fuse/fuse.py
+++ b/buildstream/_fuse/fuse.py
@@ -19,6 +19,8 @@
 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
+# pylint: skip-file
+
 from __future__ import print_function, absolute_import, division
 
 from ctypes import *
diff --git a/buildstream/_plugincontext.py b/buildstream/_plugincontext.py
index 0e1231e..53821cf 100644
--- a/buildstream/_plugincontext.py
+++ b/buildstream/_plugincontext.py
@@ -93,7 +93,7 @@ class PluginContext():
                 raise PluginError("Failed to load {} plugin '{}': {}"
                                   .format(self.base_type.__name__, kind, e)) from e
             location = package.dist.get_resource_filename(
-                pkg_resources._manager,
+                pkg_resources._manager,              # pylint: disable=no-member
                 package.module_name.replace('.', os.sep) + '.py'
             )
 
@@ -101,7 +101,7 @@ class PluginContext():
             # may need to extract the file.
             try:
                 defaults = package.dist.get_resource_filename(
-                    pkg_resources._manager,
+                    pkg_resources._manager,         # pylint: disable=no-member
                     package.module_name.replace('.', os.sep) + '.yaml'
                 )
             except KeyError:
diff --git a/buildstream/_signals.py b/buildstream/_signals.py
index ee27190..dfefd22 100644
--- a/buildstream/_signals.py
+++ b/buildstream/_signals.py
@@ -70,7 +70,7 @@ def terminator_handler(signal, frame):
 #
 @contextmanager
 def terminator(terminate_func):
-    global terminator_stack
+    global terminator_stack                   # pylint: disable=global-statement
 
     outermost = False if terminator_stack else True
 
@@ -130,7 +130,7 @@ def suspend_handler(sig, frame):
 #
 @contextmanager
 def suspendable(suspend_callback, resume_callback):
-    global suspendable_stack
+    global suspendable_stack                  # pylint: disable=global-statement
 
     outermost = False if suspendable_stack else True
     suspender = Suspender(suspend_callback, resume_callback)
diff --git a/buildstream/plugin.py b/buildstream/plugin.py
index cd0895f..f4b4444 100644
--- a/buildstream/plugin.py
+++ b/buildstream/plugin.py
@@ -654,7 +654,7 @@ def _plugin_lookup(unique_id):
 # No need for unregister, WeakValueDictionary() will remove entries
 # in itself when the referenced plugins are garbage collected.
 def _plugin_register(plugin):
-    global __PLUGINS_UNIQUE_ID
+    global __PLUGINS_UNIQUE_ID                # pylint: disable=global-statement
     __PLUGINS_UNIQUE_ID += 1
     __PLUGINS_TABLE[__PLUGINS_UNIQUE_ID] = plugin
     return __PLUGINS_UNIQUE_ID
diff --git a/buildstream/sandbox/_sandboxchroot.py b/buildstream/sandbox/_sandboxchroot.py
index 584f0e1..eedef07 100644
--- a/buildstream/sandbox/_sandboxchroot.py
+++ b/buildstream/sandbox/_sandboxchroot.py
@@ -284,7 +284,7 @@ class SandboxChroot(Sandbox):
                 # Since the exit stack has already registered a mount
                 # for this path, we do not need to register another
                 # umount call.
-                root_mount.__enter__()
+                root_mount.__enter__()               # pylint: disable=no-member
 
             yield