summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Powers <josh.powers@canonical.com>2020-06-02 08:24:29 -0700
committerGitHub <noreply@github.com>2020-06-02 11:24:29 -0400
commit5f7825e22241423322dbe628de1b00289cf34114 (patch)
tree1a2e8d8b3fc29f02256383df4012399b39600967
parentd2b05719a6163e874ca40234a0b85dc2fea260c0 (diff)
downloadvyos-cloud-init-5f7825e22241423322dbe628de1b00289cf34114.tar.gz
vyos-cloud-init-5f7825e22241423322dbe628de1b00289cf34114.zip
test: fix all flake8 E241 (#403)
Remove extra spaces after a ','
-rw-r--r--cloudinit/cmd/tests/test_query.py2
-rw-r--r--cloudinit/config/cc_apt_configure.py2
-rw-r--r--cloudinit/net/tests/test_dhcp.py2
-rw-r--r--cloudinit/sources/DataSourceGCE.py2
-rw-r--r--cloudinit/tests/test_url_helper.py2
-rw-r--r--tests/unittests/test_net.py4
-rw-r--r--tox.ini3
7 files changed, 8 insertions, 9 deletions
diff --git a/cloudinit/cmd/tests/test_query.py b/cloudinit/cmd/tests/test_query.py
index 6d36a4ea..cb15b2d2 100644
--- a/cloudinit/cmd/tests/test_query.py
+++ b/cloudinit/cmd/tests/test_query.py
@@ -261,7 +261,7 @@ class TestQuery(CiTestCase):
args = self.args(
debug=False, dump_all=False, format=None,
instance_data=self.instance_data, list_keys=True, user_data='ud',
- vendor_data='vd', varname='top')
+ vendor_data='vd', varname='top')
with mock.patch('sys.stderr', new_callable=StringIO) as m_stderr:
with mock.patch('sys.stdout', new_callable=StringIO) as m_stdout:
with mock.patch('os.getuid') as m_getuid:
diff --git a/cloudinit/config/cc_apt_configure.py b/cloudinit/config/cc_apt_configure.py
index 9a33451d..b1c7b471 100644
--- a/cloudinit/config/cc_apt_configure.py
+++ b/cloudinit/config/cc_apt_configure.py
@@ -297,7 +297,7 @@ schema = {
},
'conf': {
'type': 'string',
- 'description': dedent("""\
+ 'description': dedent("""\
Specify configuration for apt, such as proxy
configuration. This configuration is specified as a
string. For multiline apt configuration, make sure
diff --git a/cloudinit/net/tests/test_dhcp.py b/cloudinit/net/tests/test_dhcp.py
index bc7bef45..7768da7c 100644
--- a/cloudinit/net/tests/test_dhcp.py
+++ b/cloudinit/net/tests/test_dhcp.py
@@ -211,7 +211,7 @@ class TestDHCPParseStaticRoutes(CiTestCase):
"class_b": "16,172,16,10",
"class_a": "8,10,10",
"gateway": "0,0",
- "netlen": "33,0",
+ "netlen": "33,0",
}
for rfc3442 in bad_rfc3442.values():
self.assertEqual([], parse_static_routes(rfc3442))
diff --git a/cloudinit/sources/DataSourceGCE.py b/cloudinit/sources/DataSourceGCE.py
index 6cbfbbac..0ec5f6ec 100644
--- a/cloudinit/sources/DataSourceGCE.py
+++ b/cloudinit/sources/DataSourceGCE.py
@@ -116,7 +116,7 @@ def _write_host_key_to_guest_attributes(key_type, key_value):
resp = url_helper.readurl(url=url, data=key_value, headers=HEADERS,
request_method='PUT', check_status=False)
if resp.ok():
- LOG.debug('Wrote %s host key to guest attributes.', key_type)
+ LOG.debug('Wrote %s host key to guest attributes.', key_type)
else:
LOG.debug('Unable to write %s host key to guest attributes.', key_type)
diff --git a/cloudinit/tests/test_url_helper.py b/cloudinit/tests/test_url_helper.py
index 29b39374..364ec822 100644
--- a/cloudinit/tests/test_url_helper.py
+++ b/cloudinit/tests/test_url_helper.py
@@ -85,7 +85,7 @@ class TestReadFileOrUrl(CiTestCase):
read_file_or_url(url, headers=headers, headers_redact=['sensitive'])
logs = self.logs.getvalue()
for k in headers.keys():
- self.assertEqual(headers[k], httpretty.last_request().headers[k])
+ self.assertEqual(headers[k], httpretty.last_request().headers[k])
self.assertIn(REDACTED, logs)
self.assertNotIn('sekret', logs)
diff --git a/tests/unittests/test_net.py b/tests/unittests/test_net.py
index e075a64c..84d3a5f0 100644
--- a/tests/unittests/test_net.py
+++ b/tests/unittests/test_net.py
@@ -944,7 +944,7 @@ NETWORK_CONFIGS = {
dhcp6: true
""").rstrip(' '),
'expected_sysconfig_opensuse': {
- 'ifcfg-iface0': textwrap.dedent("""\
+ 'ifcfg-iface0': textwrap.dedent("""\
BOOTPROTO=dhcp
DHCLIENT6_MODE=managed
STARTMODE=auto""")
@@ -1028,7 +1028,7 @@ NETWORK_CONFIGS = {
},
'v6_and_v4': {
'expected_sysconfig_opensuse': {
- 'ifcfg-iface0': textwrap.dedent("""\
+ 'ifcfg-iface0': textwrap.dedent("""\
BOOTPROTO=dhcp
DHCLIENT6_MODE=managed
STARTMODE=auto""")
diff --git a/tox.ini b/tox.ini
index 725a0ca4..5ee67368 100644
--- a/tox.ini
+++ b/tox.ini
@@ -47,10 +47,9 @@ deps = -r{toxinidir}/test-requirements.txt
# E123: closing bracket does not match indentation of opening bracket’s line
# E126: continuation line over-indented for hanging indent
# E226: missing whitespace around arithmetic operator
-# E241: multiple spaces after ‘,’
# W503: line break before binary operator
# W504: line break after binary operator
-ignore=E121,E123,E126,E226,E241,W503,W504
+ignore=E121,E123,E126,E226,W503,W504
exclude = .venv,.tox,dist,doc,*egg,.git,build,tools
per-file-ignores =
cloudinit/cmd/main.py:E402