summaryrefslogtreecommitdiff
path: root/buildstream
diff options
context:
space:
mode:
authorJames Ennis <james.ennis@codethink.com>2018-02-14 17:02:00 +0000
committerJames Ennis <james.ennis@codethink.com>2018-03-14 14:10:26 +0000
commit81833add3730eb3f8b489e9f5cc34df7617373fc (patch)
tree8072db8db7bff7befedf6fa09de506d7e0ba3fd3 /buildstream
parent0394d67d26035234553c506539b1bd790cddec1d (diff)
downloadbuildstream-81833add3730eb3f8b489e9f5cc34df7617373fc.tar.gz
pylint - dealt with superfluous-parens warning
Diffstat (limited to 'buildstream')
-rw-r--r--buildstream/_artifactcache/ostreecache.py2
-rw-r--r--buildstream/_context.py4
-rw-r--r--buildstream/_frontend/status.py2
-rw-r--r--buildstream/_fuse/mount.py2
-rw-r--r--buildstream/_message.py2
-rw-r--r--buildstream/_profile.py4
-rw-r--r--buildstream/_scheduler/fetchqueue.py2
-rw-r--r--buildstream/_scheduler/job.py4
-rw-r--r--buildstream/_scheduler/queue.py6
-rw-r--r--buildstream/element.py10
-rw-r--r--buildstream/plugins/sources/tar.py2
-rw-r--r--buildstream/source.py6
12 files changed, 23 insertions, 23 deletions
diff --git a/buildstream/_artifactcache/ostreecache.py b/buildstream/_artifactcache/ostreecache.py
index 7d14ac079..d9b0295ea 100644
--- a/buildstream/_artifactcache/ostreecache.py
+++ b/buildstream/_artifactcache/ostreecache.py
@@ -198,7 +198,7 @@ class OSTreeCache(ArtifactCache):
push_remotes_with_artifact = set(r for r in remotes_with_artifact if r.spec.push)
push_remotes_for_project = set(self._remotes[element._get_project()])
- return not (push_remotes_for_project.issubset(push_remotes_with_artifact))
+ return not push_remotes_for_project.issubset(push_remotes_with_artifact)
# extract():
#
diff --git a/buildstream/_context.py b/buildstream/_context.py
index d93aa749f..2db13cf98 100644
--- a/buildstream/_context.py
+++ b/buildstream/_context.py
@@ -308,7 +308,7 @@ class Context():
self._message_depth.appendleft(silent_nested)
def _pop_message_depth(self):
- assert(self._message_depth)
+ assert self._message_depth
self._message_depth.popleft()
def _silent_messages(self):
@@ -334,7 +334,7 @@ class Context():
# Send it off to the log handler (can be the frontend,
# or it can be the child task which will log and propagate
# to the frontend)
- assert(self._message_handler)
+ assert self._message_handler
self._message_handler(message, context=self)
return
diff --git a/buildstream/_frontend/status.py b/buildstream/_frontend/status.py
index 82e9e2d46..0ebf93edd 100644
--- a/buildstream/_frontend/status.py
+++ b/buildstream/_frontend/status.py
@@ -228,7 +228,7 @@ class Status():
line_len = len(line)
lines += 1
for col in range(columns):
- if (col < line_len):
+ if col < line_len:
job = line[col]
column_widths[col] = max(column_widths[col], job.size)
diff --git a/buildstream/_fuse/mount.py b/buildstream/_fuse/mount.py
index ed56c9b3c..e7662d2b5 100644
--- a/buildstream/_fuse/mount.py
+++ b/buildstream/_fuse/mount.py
@@ -96,7 +96,7 @@ class Mount():
#
def mount(self, mountpoint):
- assert(self.__process is None)
+ assert self.__process is None
self.__mountpoint = mountpoint
self.__process = Process(target=self.__run_fuse)
diff --git a/buildstream/_message.py b/buildstream/_message.py
index e16766023..73b93bdc8 100644
--- a/buildstream/_message.py
+++ b/buildstream/_message.py
@@ -75,4 +75,4 @@ class Message():
self.scheduler = scheduler # Whether this is a scheduler level message
self.creation_time = datetime.datetime.now()
if message_type in (MessageType.SUCCESS, MessageType.FAIL):
- assert(elapsed is not None)
+ assert elapsed is not None
diff --git a/buildstream/_profile.py b/buildstream/_profile.py
index a9e425c89..7dd7fbb67 100644
--- a/buildstream/_profile.py
+++ b/buildstream/_profile.py
@@ -97,7 +97,7 @@ def profile_start(topic, key, message=None):
# Start profiling and hold on to the key
profile = Profile(topic, key, message)
- assert(active_profiles.get(profile.key) is None)
+ assert active_profiles.get(profile.key) is None
active_profiles[profile.key] = profile
@@ -116,7 +116,7 @@ def profile_end(topic, key):
topic_key = topic + '-' + key
profile = active_profiles.get(topic_key)
- assert(profile)
+ assert profile
profile.end()
del active_profiles[topic_key]
diff --git a/buildstream/_scheduler/fetchqueue.py b/buildstream/_scheduler/fetchqueue.py
index a99c3c9d7..bdd8e14f5 100644
--- a/buildstream/_scheduler/fetchqueue.py
+++ b/buildstream/_scheduler/fetchqueue.py
@@ -70,6 +70,6 @@ class FetchQueue(Queue):
element._update_state()
# Successful fetch, we must be CACHED now
- assert(element._consistency() == Consistency.CACHED)
+ assert element._consistency() == Consistency.CACHED
return True
diff --git a/buildstream/_scheduler/job.py b/buildstream/_scheduler/job.py
index 943ccb246..707b78ec0 100644
--- a/buildstream/_scheduler/job.py
+++ b/buildstream/_scheduler/job.py
@@ -156,7 +156,7 @@ class Job():
# Join the child process after sending SIGTERM
self.process.join(timeout)
- return (self.process.exitcode is not None)
+ return self.process.exitcode is not None
# kill()
#
@@ -404,7 +404,7 @@ class Job():
_set_last_task_error(envelope.message['domain'],
envelope.message['reason'])
elif envelope.message_type == 'result':
- assert(self.result is None)
+ assert self.result is None
self.result = envelope.message
else:
raise Exception()
diff --git a/buildstream/_scheduler/queue.py b/buildstream/_scheduler/queue.py
index 10b3bfeca..9f97e7b0c 100644
--- a/buildstream/_scheduler/queue.py
+++ b/buildstream/_scheduler/queue.py
@@ -81,9 +81,9 @@ class Queue():
self.skipped_elements = []
# Assert the subclass has setup class data
- assert(self.action_name is not None)
- assert(self.complete_name is not None)
- assert(self.queue_type is not None)
+ assert self.action_name is not None
+ assert self.complete_name is not None
+ assert self.queue_type is not None
#####################################################
# Abstract Methods for Queue implementations #
diff --git a/buildstream/element.py b/buildstream/element.py
index 48b9b756c..2efb78b85 100644
--- a/buildstream/element.py
+++ b/buildstream/element.py
@@ -797,7 +797,7 @@ class Element(Plugin):
# in a subprocess.
#
def _schedule_assemble(self):
- assert(not self.__assemble_scheduled)
+ assert not self.__assemble_scheduled
self.__assemble_scheduled = True
for source in self.__sources:
@@ -811,7 +811,7 @@ class Element(Plugin):
# in a subprocess.
#
def _assemble_done(self):
- assert(self.__assemble_scheduled)
+ assert self.__assemble_scheduled
for source in self.__sources:
source._assemble_done()
@@ -889,7 +889,7 @@ class Element(Plugin):
return False
for dependency in self.dependencies(Scope.BUILD):
- if not (dependency._cached()):
+ if not dependency._cached():
return False
return True
@@ -1055,7 +1055,7 @@ class Element(Plugin):
def _assemble(self):
# Assert call ordering
- assert(not self._cached())
+ assert not self._cached()
context = self._get_context()
with self._output_file() as output_file:
@@ -1946,7 +1946,7 @@ class Element(Plugin):
def _load_public_data(self):
self._assert_cached()
- assert(self.__dynamic_public is None)
+ assert self.__dynamic_public is None
# Load the public data from the artifact
metadir = os.path.join(self.__extract(), 'meta')
diff --git a/buildstream/plugins/sources/tar.py b/buildstream/plugins/sources/tar.py
index 284554fe1..cb7dbf69a 100644
--- a/buildstream/plugins/sources/tar.py
+++ b/buildstream/plugins/sources/tar.py
@@ -79,7 +79,7 @@ class TarSource(DownloadableFileSource):
@contextmanager
def _run_lzip(self):
- assert(self.host_lzip)
+ assert self.host_lzip
with TemporaryFile() as lzip_stdout:
with ExitStack() as context:
lzip_file = context.enter_context(open(self._get_mirror_file(), 'r'))
diff --git a/buildstream/source.py b/buildstream/source.py
index 849227967..436c9912e 100644
--- a/buildstream/source.py
+++ b/buildstream/source.py
@@ -339,7 +339,7 @@ class Source(Plugin):
# in a subprocess.
#
def _schedule_assemble(self):
- assert(not self.__assemble_scheduled)
+ assert not self.__assemble_scheduled
self.__assemble_scheduled = True
# Invalidate workspace key as the build modifies the workspace directory
@@ -351,7 +351,7 @@ class Source(Plugin):
# in a subprocess.
#
def _assemble_done(self):
- assert(self.__assemble_scheduled)
+ assert self.__assemble_scheduled
self.__assemble_scheduled = False
# _stable():
@@ -499,7 +499,7 @@ class Source(Plugin):
# new calculation to happen by setting the 'recalculate' flag.
#
def _get_workspace_key(self, recalculate=False):
- assert(not self.__assemble_scheduled)
+ assert not self.__assemble_scheduled
if recalculate or self.__workspace_key is None:
fullpath = self._get_workspace_path()