[virt-tools-list] [virt-manager PATCH] pycodestyle: fix all E131 warnings
Chen Hanxiao
chen_han_xiao at 126.com
Fri Aug 18 01:18:29 UTC 2017
From: Chen Hanxiao <chenhanxiao at gmail.com>
Fix all E131:
Continuation line unaligned for hanging indent
Also remove ignore options of E131
Signed-off-by: Chen Hanxiao <chenhanxiao at gmail.com>
---
tests/clitest.py | 6 +++---
tests/pycodestyle.cfg | 3 +--
virt-install | 2 +-
virtManager/clone.py | 2 +-
virtManager/createinterface.py | 2 +-
virtManager/manager.py | 10 +++++-----
6 files changed, 12 insertions(+), 13 deletions(-)
diff --git a/tests/clitest.py b/tests/clitest.py
index ca2ca1f..3fe2d7f 100644
--- a/tests/clitest.py
+++ b/tests/clitest.py
@@ -238,9 +238,9 @@ class Command(object):
raise AssertionError(
("Expected command to %s, but it didn't.\n" %
(self.check_success and "pass" or "fail")) +
- ("Command was: %s\n" % self.cmdstr) +
- ("Error code : %d\n" % code) +
- ("Output was:\n%s" % output))
+ ("Command was: %s\n" % self.cmdstr) +
+ ("Error code : %d\n" % code) +
+ ("Output was:\n%s" % output))
if self.compare_file:
if self._check_support(tests, conn, self.compare_check,
diff --git a/tests/pycodestyle.cfg b/tests/pycodestyle.cfg
index 0b0d45c..2588043 100644
--- a/tests/pycodestyle.cfg
+++ b/tests/pycodestyle.cfg
@@ -16,7 +16,6 @@ format = pylint
# E127: Continuation line over-indented for visual indent
# E128: Continuation line under-indented for visual indent
# E129: Visually indented line with same indent as next logical line
-# E131: Continuation line unaligned for hanging indent
# E221: Multiple spaces before operator
# E241: Multiple spaces after ‘,’
# E301: Expected 1 blank line, found 0
@@ -29,4 +28,4 @@ format = pylint
# E741: Do not use variables named ‘l’, ‘O’, or ‘I’
-ignore = E122, E123, E124, E125, E126, E127, E128, E129, E131, E221, E241, E301, E303, E305, E306, E402, E501, E741
+ignore = E122, E123, E124, E125, E126, E127, E128, E129, E221, E241, E301, E303, E305, E306, E402, E501, E741
diff --git a/virt-install b/virt-install
index 10be93f..4163d0f 100755
--- a/virt-install
+++ b/virt-install
@@ -439,7 +439,7 @@ def validate_required_options(options, guest):
(not cdrom_specified(guest, options.disk))):
msg += "\n" + (
_("An install method must be specified\n(%(methods)s)") %
- {"methods": install_methods})
+ {"methods": install_methods})
if msg:
fail(msg)
diff --git a/virtManager/clone.py b/virtManager/clone.py
index 4eb3a4a..baa4d2e 100644
--- a/virtManager/clone.py
+++ b/virtManager/clone.py
@@ -792,7 +792,7 @@ class vmmCloneVM(vmmGObjectUI):
_("The following disk devices will not be cloned:\n\n%s\n"
"Running the new guest could overwrite data in these "
"disk images.")
- % warn_str)
+ % warn_str)
if not res:
return False
diff --git a/virtManager/createinterface.py b/virtManager/createinterface.py
index f01d178..fa2c6e7 100644
--- a/virtManager/createinterface.py
+++ b/virtManager/createinterface.py
@@ -975,7 +975,7 @@ class vmmCreateInterface(vmmGObjectUI):
"configured:\n\n%s\n\nUsing these may overwrite "
"their existing configuration. Are you sure you "
"want to use the selected interface(s)?") %
- defined_ifaces)
+ defined_ifaces)
if not ret:
return ret
diff --git a/virtManager/manager.py b/virtManager/manager.py
index d170355..73fe6ea 100644
--- a/virtManager/manager.py
+++ b/virtManager/manager.py
@@ -127,15 +127,15 @@ class vmmManager(vmmGObjectUI):
self.builder.connect_signals({
"on_menu_view_guest_cpu_usage_activate":
- self.toggle_stats_visible_guest_cpu,
+ self.toggle_stats_visible_guest_cpu,
"on_menu_view_host_cpu_usage_activate":
- self.toggle_stats_visible_host_cpu,
+ self.toggle_stats_visible_host_cpu,
"on_menu_view_memory_usage_activate":
- self.toggle_stats_visible_memory_usage,
+ self.toggle_stats_visible_memory_usage,
"on_menu_view_disk_io_activate":
- self.toggle_stats_visible_disk,
+ self.toggle_stats_visible_disk,
"on_menu_view_network_traffic_activate":
- self.toggle_stats_visible_network,
+ self.toggle_stats_visible_network,
"on_vm_manager_delete_event": self.close,
"on_vmm_manager_configure_event": self.window_resized,
--
2.7.5
More information about the virt-tools-list
mailing list