diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2018-12-16 18:28:10 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2018-12-26 14:54:05 -0500 |
commit | 1f8cc996b60ba4bdf804c414e987757dbb0f8c59 (patch) | |
tree | 88a8f0cd5691627b0d1abdda64b99cf69acd8037 | |
parent | 425781db65d183e8f069a217984352cb22f6cb34 (diff) | |
download | buildstream-1f8cc996b60ba4bdf804c414e987757dbb0f8c59.tar.gz |
element.py: Fixing new (unnecessary-pass) and (simplifiable-if-expression) linter errors
-rw-r--r-- | buildstream/element.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/buildstream/element.py b/buildstream/element.py index 2b6c68c5d..f0620a57e 100644 --- a/buildstream/element.py +++ b/buildstream/element.py @@ -326,7 +326,6 @@ class Element(Plugin): *Since: 1.2* """ - pass def assemble(self, sandbox): """Assemble the output artifact @@ -1340,7 +1339,7 @@ class Element(Plugin): @contextmanager def _prepare_sandbox(self, scope, directory, shell=False, integrate=True, usebuildtree=False): # bst shell and bst checkout require a local sandbox. - bare_directory = True if directory else False + bare_directory = bool(directory) with self.__sandbox(directory, config=self.__sandbox_config, allow_remote=False, bare_directory=bare_directory) as sandbox: sandbox._usebuildtree = usebuildtree @@ -1695,7 +1694,7 @@ class Element(Plugin): # Store workspaced.yaml _yaml.dump(_yaml.node_sanitize({ - 'workspaced': True if self._get_workspace() else False + 'workspaced': bool(self._get_workspace()) }), os.path.join(metadir, 'workspaced.yaml')) # Store workspaced-dependencies.yaml |