Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: fix all flake8 E241 #403

Merged
merged 2 commits into from
Jun 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cloudinit/cmd/tests/test_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ def test_handle_args_list_keys_errors_when_varname_is_not_a_dict(self):
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:
Expand Down
2 changes: 1 addition & 1 deletion cloudinit/config/cc_apt_configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@
},
'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
Expand Down
2 changes: 1 addition & 1 deletion cloudinit/net/tests/test_dhcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def test_parse_static_routes_logs_error_truncated(self):
"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))
Expand Down
2 changes: 1 addition & 1 deletion cloudinit/sources/DataSourceGCE.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion cloudinit/tests/test_url_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def test_read_file_or_url_str_from_url_redacting_headers_from_logs(self):
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)

Expand Down
4 changes: 2 additions & 2 deletions tests/unittests/test_net.py
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,7 @@
dhcp6: true
""").rstrip(' '),
'expected_sysconfig_opensuse': {
'ifcfg-iface0': textwrap.dedent("""\
'ifcfg-iface0': textwrap.dedent("""\
BOOTPROTO=dhcp
DHCLIENT6_MODE=managed
STARTMODE=auto""")
Expand Down Expand Up @@ -1028,7 +1028,7 @@
},
'v6_and_v4': {
'expected_sysconfig_opensuse': {
'ifcfg-iface0': textwrap.dedent("""\
'ifcfg-iface0': textwrap.dedent("""\
BOOTPROTO=dhcp
DHCLIENT6_MODE=managed
STARTMODE=auto""")
Expand Down
3 changes: 1 addition & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down