[virt-tools-list] [virt-manager PATCH 2/2] pycodestyle: fix all E203 warnings
Chen Hanxiao
chen_han_xiao at 126.com
Tue Aug 8 02:07:33 UTC 2017
At 2017-08-07 16:09:49, "Radostin Stoyanov" <rstoyanov1 at gmail.com> wrote:
>
>On 07/08/17 02:15, Chen Hanxiao wrote:
>>
>>
>> At 2017-08-07 05:35:48, "Cole Robinson" <crobinso at redhat.com> wrote:
>>> On 08/05/2017 03:01 AM, Chen Hanxiao wrote:
>>>> From: Chen Hanxiao <chenhanxiao at gmail.com>
>>>>
>>>> Fix all E203 whitespace before ':'
>>>>
>>>> Signed-off-by: Chen Hanxiao <chenhanxiao at gmail.com>
>>> This one is also already ignored in tests/pycodestyle.cfg, is it giving you
>>> warnings?
>>>
>>> That said this is one that I'm fine with keeping as long as we can preserve
>>> horizontal alignment in a few places, which you've kept. But I'm curious as to
>>> how you hit these issues. What version of pycodestyle do you have installed?
>>>
>>> - Cole
>>>
>
>Hi Chen,
>
>This will happen if pycodestyle cannot find the file
>"tests/pycodestyle.cfg" [1]
>
>Would you be able to check if this works for you?
>
>diff --git a/setup.py b/setup.py
>index 6f4b37ba..be67be30 100755
>--- a/setup.py
>+++ b/setup.py
>@@ -582,7 +582,7 @@ class CheckPylint(distutils.core.Command):
>
> print("running pycodestyle")
> cmd = "pycodestyle "
>- cmd += "--config tests/pycodestyle.cfg "
>+ cmd += "--config ./tests/pycodestyle.cfg "
> cmd += "--exclude %s " % ",".join(exclude)
> cmd += " ".join(files)
> os.system(cmd)
>
>or
>
>diff --git a/setup.py b/setup.py
>index 6f4b37ba..246a43a6 100755
>--- a/setup.py
>+++ b/setup.py
>@@ -582,7 +582,7 @@ class CheckPylint(distutils.core.Command):
>
> print("running pycodestyle")
> cmd = "pycodestyle "
>- cmd += "--config tests/pycodestyle.cfg "
>+ cmd += "--config %s " % os.path.realpath('tests/pycodestyle.cfg')
> cmd += "--exclude %s " % ",".join(exclude)
> cmd += " ".join(files)
> os.system(cmd)
>
>[1] https://github.com/PyCQA/pycodestyle/blob/master/pycodestyle.py#L2213
>>
Hi, Radostin:
Neither of these works for me.
After some googling, I found:
https://github.com/PyCQA/pycodestyle/issues/564
Seams like a pycodestyle bug on 2.0.0
I replaced pycodestyle by its upstream version, all works fine with virt-manager upstream codes.
Regards,
- Chen
More information about the virt-tools-list
mailing list