diff options
author | James Ennis <james.ennis@codethink.com> | 2018-02-14 14:48:22 +0000 |
---|---|---|
committer | James Ennis <james.ennis@codethink.com> | 2018-03-14 14:10:26 +0000 |
commit | 1ec691c7603a179ad835db237da89a7d9bd24d25 (patch) | |
tree | aac80b2637208e7d93c6b9cfe76997f2888746c8 | |
parent | ef0efd7010799e568e9eec4bf57027c547bdc49d (diff) | |
download | buildstream-1ec691c7603a179ad835db237da89a7d9bd24d25.tar.gz |
pylint - dealt with bad-continuation warning
-rw-r--r-- | .pylintrc | 1 | ||||
-rw-r--r-- | buildstream/_frontend/main.py | 3 | ||||
-rw-r--r-- | buildstream/_loader.py | 4 | ||||
-rw-r--r-- | buildstream/_scheduler/job.py | 3 | ||||
-rw-r--r-- | buildstream/element.py | 4 | ||||
-rw-r--r-- | buildstream/plugins/sources/bzr.py | 6 |
6 files changed, 9 insertions, 12 deletions
@@ -112,7 +112,6 @@ disable=##################################### # Messages that report warnings which should be addressed # ########################################################### - bad-continuation, bare-except, broad-except, consider-merging-isinstance, diff --git a/buildstream/_frontend/main.py b/buildstream/_frontend/main.py index 98bad3504..e6f365de2 100644 --- a/buildstream/_frontend/main.py +++ b/buildstream/_frontend/main.py @@ -430,8 +430,7 @@ class App(): self.fail_messages[message.unique_id] = message # Send to frontend if appropriate - if (self.context._silent_messages() and - message.message_type not in unconditional_messages): + if self.context._silent_messages() and (message.message_type not in unconditional_messages): return if self.status: diff --git a/buildstream/_loader.py b/buildstream/_loader.py index de9efdd25..2b91b34fd 100644 --- a/buildstream/_loader.py +++ b/buildstream/_loader.py @@ -370,8 +370,8 @@ class Loader(): if e.reason == LoadErrorReason.MISSING_FILE: raise LoadError(reason=e.reason, message="Could not find the project.conf file for {}. " - "Expecting a project at path '{}' within {}". - format(element, element.path or '.', source)) from e + "Expecting a project at path '{}' within {}" + .format(element, element.path or '.', source)) from e else: raise diff --git a/buildstream/_scheduler/job.py b/buildstream/_scheduler/job.py index 962ca3c13..7a96452b3 100644 --- a/buildstream/_scheduler/job.py +++ b/buildstream/_scheduler/job.py @@ -378,8 +378,7 @@ class Job(): message.message_type = MessageType.WARN # Send to frontend if appropriate - if (context._silent_messages() and - message.message_type not in unconditional_messages): + if context._silent_messages() and (message.message_type not in unconditional_messages): return if message.message_type == MessageType.LOG: diff --git a/buildstream/element.py b/buildstream/element.py index 2b2f16062..48b9b756c 100644 --- a/buildstream/element.py +++ b/buildstream/element.py @@ -1615,7 +1615,7 @@ class Element(Plugin): cached = self.__artifacts.contains(self, self.__weak_cache_key) remotely_cached = self.__artifacts.remote_contains(self, self.__weak_cache_key) if (not self.__assemble_scheduled and not self.__assemble_done and - not cached and not remotely_cached): + not cached and not remotely_cached): self._schedule_assemble() return @@ -1641,7 +1641,7 @@ class Element(Plugin): self.__remotely_strong_cached = self.__artifacts.remote_contains(self, self.__strict_cache_key) if (not self.__assemble_scheduled and not self.__assemble_done and - not self.__cached and not self.__remotely_cached): + not self.__cached and not self.__remotely_cached): # Workspaced sources are considered unstable if a build is pending # as the build will modify the contents of the workspace. # Determine as early as possible if a build is pending to discard diff --git a/buildstream/plugins/sources/bzr.py b/buildstream/plugins/sources/bzr.py index 6bccbfecf..88349561c 100644 --- a/buildstream/plugins/sources/bzr.py +++ b/buildstream/plugins/sources/bzr.py @@ -98,7 +98,7 @@ class BzrSource(Source): "--custom", "--template={revno}", self._get_branch_dir()], fail="Failed to read the revision number at '{}'" - .format(self._get_branch_dir())) + .format(self._get_branch_dir())) if ret != 0: raise SourceError("{}: Failed to get ref for tracking {}".format(self, self.tracking)) @@ -114,7 +114,7 @@ class BzrSource(Source): "--revision=revno:{}".format(self.ref), self._get_branch_dir(), directory], fail="Failed to checkout revision {} from branch {} to {}" - .format(self.ref, self._get_branch_dir(), directory)) + .format(self.ref, self._get_branch_dir(), directory)) def init_workspace(self, directory): url = os.path.join(self.url, self.tracking) @@ -125,7 +125,7 @@ class BzrSource(Source): "--revision=revno:{}".format(self.ref), self._get_branch_dir(), directory], fail="Failed to branch revision {} from branch {} to {}" - .format(self.ref, self._get_branch_dir(), directory)) + .format(self.ref, self._get_branch_dir(), directory)) # Switch the parent branch to the source's origin self.call([self.host_bzr, "switch", "--directory={}".format(directory), url], |