On 07/08/17 02:15, Chen Hanxiao wrote:
>
>
> At 2017-08-07 05:35:48, "Cole Robinson" <crobi...@redhat.com> wrote:
>> On 08/05/2017 03:01 AM, Chen Hanxiao wrote:
>>> From: Chen Hanxiao <chenhanx...@gmail.com>
>>>
>>>    Fix all E203 whitespace before ':'
>>>
>>> Signed-off-by: Chen Hanxiao <chenhanx...@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
>>
>> $ pycodestyle --version
>> 2.0.0
> I'll push [2/2] later.
>
> # pycodestyle --version
> 2.0.0
>
> # python setup.py pylint
> running pylint
> running pycodestyle
> setup.py:73:5: E301 expected 1 blank line, found 0
> setup.py:143:25: E129 visually indented line with same indent as next logical 
> line
> setup.py:175:5: E303 too many blank lines (2)
> setup.py:214:5: E303 too many blank lines (2)
> setup.py:294:5: E301 expected 1 blank line, found 0
> setup.py:347:5: E303 too many blank lines (2)
> setup.py:482:1: E303 too many blank lines (3)
> .....
>
> hundreds of lines.
>
> Looks the ignore config not actting as we wished on my Fedora24.
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
>
> Regards,
> - Chen
>
> _______________________________________________
> virt-tools-list mailing list
> virt-tools-list@redhat.com
> https://www.redhat.com/mailman/listinfo/virt-tools-list

_______________________________________________
virt-tools-list mailing list
virt-tools-list@redhat.com
https://www.redhat.com/mailman/listinfo/virt-tools-list

Reply via email to