curtin-dev team mailing list archive
-
curtin-dev team
-
Mailing list archive
-
Message #02537
[Merge] ~dbungert/curtin:fix-style-tip into curtin:master
Dan Bungert has proposed merging ~dbungert/curtin:fix-style-tip into curtin:master.
Commit message:
many: fix several instances of whitespace lint
`tox -e tip-pycodestyle` reported several instances of:
E275 missing whitespace after keyword
Requested reviews:
curtin developers (curtin-dev)
For more details, see:
https://code.launchpad.net/~dbungert/curtin/+git/curtin/+merge/430694
--
Your team curtin developers is requested to review the proposed merge of ~dbungert/curtin:fix-style-tip into curtin:master.
diff --git a/curtin/reporter/events.py b/curtin/reporter/events.py
index af6dfb0..ec92e42 100644
--- a/curtin/reporter/events.py
+++ b/curtin/reporter/events.py
@@ -234,7 +234,7 @@ class ReportEventStack(object):
def _finish_info(self, exc):
# return tuple of description, and value
# explicitly handle sys.exit(0) as not an error
- if exc and not(isinstance(exc, SystemExit) and exc.code == 0):
+ if exc and not (isinstance(exc, SystemExit) and exc.code == 0):
return (self.result_on_exception, self.message)
return self._childrens_finish_info()
diff --git a/curtin/storage_config.py b/curtin/storage_config.py
index 9c522d8..b1d48cb 100644
--- a/curtin/storage_config.py
+++ b/curtin/storage_config.py
@@ -129,7 +129,7 @@ def validate_config(config, sourcefile=None):
except jsonschema.exceptions.ValidationError as f:
msg = "%s in %s\n%s" % (f.message, sourcefile,
util.json_dumps(e.instance))
- raise(ValueError(msg))
+ raise ValueError(msg)
else:
msg = "Unknown storage type: %s in %s" % (instance_type,
e.instance)
diff --git a/curtin/url_helper.py b/curtin/url_helper.py
index ee4640b..38f74c9 100644
--- a/curtin/url_helper.py
+++ b/curtin/url_helper.py
@@ -436,7 +436,7 @@ def _oauth_headers_oauth(url, consumer_key, token_key, token_secret,
req = oauth.OAuthRequest(http_url=url, parameters=params)
req.sign_request(
oauth.OAuthSignatureMethod_PLAINTEXT(), consumer, token)
- return(req.to_header())
+ return req.to_header()
def _oauth_headers_oauthlib(url, consumer_key, token_key, token_secret,
diff --git a/curtin/util.py b/curtin/util.py
index d3c3b66..aaa6008 100644
--- a/curtin/util.py
+++ b/curtin/util.py
@@ -875,7 +875,7 @@ def get_paths(curtin_exe=None, lib=None, helpers=None):
if helpers is None:
helpers = _installed_file_path(_INSTALLED_HELPERS_PATH, cfile)
- return({'curtin_exe': curtin_exe, 'lib': mydir, 'helpers': helpers})
+ return {'curtin_exe': curtin_exe, 'lib': mydir, 'helpers': helpers}
def find_newer(src, files):
diff --git a/tests/unittests/test_storage_config.py b/tests/unittests/test_storage_config.py
index a109dd7..71cd528 100644
--- a/tests/unittests/test_storage_config.py
+++ b/tests/unittests/test_storage_config.py
@@ -184,7 +184,7 @@ class TestBcacheParser(CiTestCase):
def test_bcache_parse_tolerates_missing_blockdev_data(self):
""" BcacheParser ValueError on missing 'blockdev' dict."""
- del(self.probe_data['blockdev'])
+ del self.probe_data['blockdev']
b = BcacheParser(self.probe_data)
(configs, errors) = b.parse()
self.assertEqual([], configs)
diff --git a/tests/unittests/test_util.py b/tests/unittests/test_util.py
index 0377357..a111ea1 100644
--- a/tests/unittests/test_util.py
+++ b/tests/unittests/test_util.py
@@ -131,7 +131,7 @@ class TestSubp(CiTestCase):
def printf_cmd(self, *args):
# bash's printf supports \xaa. So does /usr/bin/printf
# but by using bash, we remove dependency on another program.
- return(['bash', '-c', 'printf "$@"', 'printf'] + list(args))
+ return ['bash', '-c', 'printf "$@"', 'printf'] + list(args)
def test_subp_handles_utf8(self):
# The given bytes contain utf-8 accented characters as seen in e.g.
Follow ups