diff options
author | James Ennis <james.ennis@codethink.com> | 2018-02-14 15:16:58 +0000 |
---|---|---|
committer | James Ennis <james.ennis@codethink.com> | 2018-03-14 14:10:26 +0000 |
commit | 05fa346f9911638b272eca0b62a110b590803ab2 (patch) | |
tree | e834cef0de6d74e4b45f8ab5acb1b3d3cfcbd1ad /buildstream | |
parent | 1ba6167b8fc86964bfb0f12f266eb25b8233e194 (diff) | |
download | buildstream-05fa346f9911638b272eca0b62a110b590803ab2.tar.gz |
pylint - dealt with global-statement warning
Diffstat (limited to 'buildstream')
-rw-r--r-- | buildstream/_exceptions.py | 2 | ||||
-rw-r--r-- | buildstream/_profile.py | 2 | ||||
-rw-r--r-- | buildstream/_signals.py | 4 | ||||
-rw-r--r-- | buildstream/plugin.py | 2 |
4 files changed, 6 insertions, 4 deletions
diff --git a/buildstream/_exceptions.py b/buildstream/_exceptions.py index a65ab471e..8a4f13aea 100644 --- a/buildstream/_exceptions.py +++ b/buildstream/_exceptions.py @@ -20,6 +20,8 @@ from enum import Enum +# Disable pylint warnings for whole file here: +# pylint: disable=global-statement # The last raised exception, this is used in test cases only _last_exception = None diff --git a/buildstream/_profile.py b/buildstream/_profile.py index a7fad0a97..a9e425c89 100644 --- a/buildstream/_profile.py +++ b/buildstream/_profile.py @@ -122,7 +122,7 @@ def profile_end(topic, key): def profile_init(): - global initialized + global initialized # pylint: disable=global-statement if not initialized: setting = os.getenv('BST_PROFILE') if setting: diff --git a/buildstream/_signals.py b/buildstream/_signals.py index 84a5af94f..30af75b36 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 353f13cc1..ad59da684 100644 --- a/buildstream/plugin.py +++ b/buildstream/plugin.py @@ -672,7 +672,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 |