[virt-tools-list] [virt-manager PATCH] pycodestyle: fix all E125 warnings
Pavel Hrdina
phrdina at redhat.com
Mon Oct 2 09:58:58 UTC 2017
On Wed, Sep 20, 2017 at 04:06:49PM +0800, Chen Hanxiao wrote:
> From: Chen Hanxiao <chenhanxiao at gmail.com>
>
> Fix all E125:
> Continuation line with same indent as next logical line
>
> Also remove ignore options of E125
>
> Signed-off-by: Chen Hanxiao <chenhanxiao at gmail.com>
> ---
> tests/pycodestyle.cfg | 3 +--
> virt-xml | 2 +-
> virtManager/connection.py | 6 +++---
> virtManager/details.py | 16 ++++++++--------
> virtManager/domain.py | 44 ++++++++++++++++++++++----------------------
> virtManager/engine.py | 4 ++--
> virtManager/netlist.py | 2 +-
> virtManager/viewers.py | 4 ++--
> virtManager/vmmenu.py | 2 +-
> virtinst/cli.py | 4 ++--
> virtinst/devicegraphics.py | 2 +-
> virtinst/domcapabilities.py | 2 +-
> virtinst/guest.py | 4 ++--
> virtinst/osdict.py | 2 +-
> virtinst/pollhelpers.py | 12 ++++++------
> virtinst/storage.py | 6 +++---
> virtinst/urlfetcher.py | 2 +-
> 17 files changed, 58 insertions(+), 59 deletions(-)
[...]
> diff --git a/virtManager/details.py b/virtManager/details.py
> index e74ea5f..8e0bcb2 100644
> --- a/virtManager/details.py
> +++ b/virtManager/details.py
> @@ -1129,12 +1129,12 @@ class vmmDetails(vmmGObjectUI):
> return False
>
> if not self.err.chkbox_helper(
> - self.config.get_confirm_unapplied,
> - self.config.set_confirm_unapplied,
> - text1=(_("There are unapplied changes. Would you like to apply "
> - "them now?")),
> - chktext=_("Don't warn me again."),
> - default=False):
> + self.config.get_confirm_unapplied,
> + self.config.set_confirm_unapplied,
> + text1=(_("There are unapplied changes. Would you like to apply "
> + "them now?")),
> + chktext=_("Don't warn me again."),
> + default=False):
> return False
>
> return not self.config_apply(row=row)
> @@ -2275,8 +2275,8 @@ class vmmDetails(vmmGObjectUI):
> logging.debug("Removing device: %s", devobj)
>
> if not self.err.chkbox_helper(self.config.get_confirm_removedev,
> - self.config.set_confirm_removedev,
> - text1=(_("Are you sure you want to remove this device?"))):
> + self.config.set_confirm_removedev,
> + text1=(_("Are you sure you want to remove this device?"))):
> return
>
> # Define the change
This change will fix the E125 warning but it could be extended to fix
the E128 warning as well. Otherwise these lines would be modified twice
in order to fix both warnings. What I would suggest is to create a
patch series, that fixes all of E126, E127, E128, E125, E129, E122 in
that order. These warnings are slightly related.
Pavel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20171002/2a897823/attachment.sig>
More information about the virt-tools-list
mailing list