summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier Jardón <jjardon@gnome.org>2018-08-28 20:41:08 +0100
committerJavier Jardón <jjardon@gnome.org>2018-08-28 23:22:00 +0100
commit3ae5fd05d0b9b97448d40ba64c528f31f83c2915 (patch)
tree935e78b6c82b7a329683d3ef15e995a5c4906b0b
parentd3c32ca2f7d667c6d0ce5bc21118ef7cbd7cdc0a (diff)
downloadbuildstream-3ae5fd05d0b9b97448d40ba64c528f31f83c2915.tar.gz
Fix E305 warnings
-rw-r--r--buildstream/utils.py1
-rwxr-xr-xdoc/bst2html.py1
-rw-r--r--tests/cachekey/cachekey.py1
-rwxr-xr-xtests/cachekey/update.py1
-rw-r--r--tests/frontend/buildcheckout.py1
5 files changed, 5 insertions, 0 deletions
diff --git a/buildstream/utils.py b/buildstream/utils.py
index 943346689..3d8bd62ca 100644
--- a/buildstream/utils.py
+++ b/buildstream/utils.py
@@ -645,6 +645,7 @@ def _pretty_size(size, dec_places=0):
psize /= 1024
return "{size:g}{unit}".format(size=round(psize, dec_places), unit=unit)
+
# A sentinel to be used as a default argument for functions that need
# to distinguish between a kwarg set to None and an unset kwarg.
_sentinel = object()
diff --git a/doc/bst2html.py b/doc/bst2html.py
index 47ea662b5..0cfb43b5c 100755
--- a/doc/bst2html.py
+++ b/doc/bst2html.py
@@ -455,6 +455,7 @@ def run_bst(directory, force, source_cache, description, palette):
return 0
+
if __name__ == '__main__':
try:
run_bst()
diff --git a/tests/cachekey/cachekey.py b/tests/cachekey/cachekey.py
index 21beef8fb..b1f8a9140 100644
--- a/tests/cachekey/cachekey.py
+++ b/tests/cachekey/cachekey.py
@@ -129,6 +129,7 @@ def assert_cache_keys(project_dir, output):
"Use tests/cachekey/update.py to automatically " +
"update this test case")
+
##############################################
# Test Entry Point #
##############################################
diff --git a/tests/cachekey/update.py b/tests/cachekey/update.py
index 09cf19657..8cbee444d 100755
--- a/tests/cachekey/update.py
+++ b/tests/cachekey/update.py
@@ -65,5 +65,6 @@ def update_keys():
write_expected_key(element_name, actual_keys[element_name])
+
if __name__ == '__main__':
update_keys()
diff --git a/tests/frontend/buildcheckout.py b/tests/frontend/buildcheckout.py
index d0f52d6a7..4d409cdfe 100644
--- a/tests/frontend/buildcheckout.py
+++ b/tests/frontend/buildcheckout.py
@@ -288,6 +288,7 @@ def test_build_checkout_force_tarball(datafiles, cli):
assert os.path.join('.', 'usr', 'bin', 'hello') in tar.getnames()
assert os.path.join('.', 'usr', 'include', 'pony.h') in tar.getnames()
+
fetch_build_checkout_combos = \
[("strict", kind) for kind in ALL_REPO_KINDS] + \
[("non-strict", kind) for kind in ALL_REPO_KINDS]