Skip to content

Commit 5f7825e

Browse files
author
Joshua Powers
authored
test: fix all flake8 E241 (canonical#403)
Remove extra spaces after a ','
1 parent d2b0571 commit 5f7825e

File tree

7 files changed

+8
-9
lines changed

7 files changed

+8
-9
lines changed

cloudinit/cmd/tests/test_query.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ def test_handle_args_list_keys_errors_when_varname_is_not_a_dict(self):
261261
args = self.args(
262262
debug=False, dump_all=False, format=None,
263263
instance_data=self.instance_data, list_keys=True, user_data='ud',
264-
vendor_data='vd', varname='top')
264+
vendor_data='vd', varname='top')
265265
with mock.patch('sys.stderr', new_callable=StringIO) as m_stderr:
266266
with mock.patch('sys.stdout', new_callable=StringIO) as m_stdout:
267267
with mock.patch('os.getuid') as m_getuid:

cloudinit/config/cc_apt_configure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@
297297
},
298298
'conf': {
299299
'type': 'string',
300-
'description': dedent("""\
300+
'description': dedent("""\
301301
Specify configuration for apt, such as proxy
302302
configuration. This configuration is specified as a
303303
string. For multiline apt configuration, make sure

cloudinit/net/tests/test_dhcp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ def test_parse_static_routes_logs_error_truncated(self):
211211
"class_b": "16,172,16,10",
212212
"class_a": "8,10,10",
213213
"gateway": "0,0",
214-
"netlen": "33,0",
214+
"netlen": "33,0",
215215
}
216216
for rfc3442 in bad_rfc3442.values():
217217
self.assertEqual([], parse_static_routes(rfc3442))

cloudinit/sources/DataSourceGCE.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def _write_host_key_to_guest_attributes(key_type, key_value):
116116
resp = url_helper.readurl(url=url, data=key_value, headers=HEADERS,
117117
request_method='PUT', check_status=False)
118118
if resp.ok():
119-
LOG.debug('Wrote %s host key to guest attributes.', key_type)
119+
LOG.debug('Wrote %s host key to guest attributes.', key_type)
120120
else:
121121
LOG.debug('Unable to write %s host key to guest attributes.', key_type)
122122

cloudinit/tests/test_url_helper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def test_read_file_or_url_str_from_url_redacting_headers_from_logs(self):
8585
read_file_or_url(url, headers=headers, headers_redact=['sensitive'])
8686
logs = self.logs.getvalue()
8787
for k in headers.keys():
88-
self.assertEqual(headers[k], httpretty.last_request().headers[k])
88+
self.assertEqual(headers[k], httpretty.last_request().headers[k])
8989
self.assertIn(REDACTED, logs)
9090
self.assertNotIn('sekret', logs)
9191

tests/unittests/test_net.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -944,7 +944,7 @@
944944
dhcp6: true
945945
""").rstrip(' '),
946946
'expected_sysconfig_opensuse': {
947-
'ifcfg-iface0': textwrap.dedent("""\
947+
'ifcfg-iface0': textwrap.dedent("""\
948948
BOOTPROTO=dhcp
949949
DHCLIENT6_MODE=managed
950950
STARTMODE=auto""")
@@ -1028,7 +1028,7 @@
10281028
},
10291029
'v6_and_v4': {
10301030
'expected_sysconfig_opensuse': {
1031-
'ifcfg-iface0': textwrap.dedent("""\
1031+
'ifcfg-iface0': textwrap.dedent("""\
10321032
BOOTPROTO=dhcp
10331033
DHCLIENT6_MODE=managed
10341034
STARTMODE=auto""")

tox.ini

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,9 @@ deps = -r{toxinidir}/test-requirements.txt
4747
# E123: closing bracket does not match indentation of opening bracket’s line
4848
# E126: continuation line over-indented for hanging indent
4949
# E226: missing whitespace around arithmetic operator
50-
# E241: multiple spaces after ‘,’
5150
# W503: line break before binary operator
5251
# W504: line break after binary operator
53-
ignore=E121,E123,E126,E226,E241,W503,W504
52+
ignore=E121,E123,E126,E226,W503,W504
5453
exclude = .venv,.tox,dist,doc,*egg,.git,build,tools
5554
per-file-ignores =
5655
cloudinit/cmd/main.py:E402

0 commit comments

Comments
 (0)