[Buildbot-devel] Using pep8 on Buildbot source code
Vladimir Rutsky
rutsky.vladimir at gmail.com
Thu Oct 24 06:59:01 UTC 2013
Hello!
On 24.10.2013 06:06, Edmund Wong wrote:
> Vladimir Rutsky wrote:
>> Hello!
>>
>> Recently Dustin merged changes that adds pep8
>> (http://pep8.readthedocs.org/en/latest/intro.html) run on Buildbot
>> source code on Travis and I hope it soon will be run on
>> http://buildbot.buildbot.net (bugs http://trac.buildbot.net/ticket/2572,
>> http://trac.buildbot.net/ticket/2573).
>> 316 W291 trailing whitespace
>>
> Hi,
>
> I've come across a quirk with pep8 while fixing W291 via pull request
> #934 (which is closed. vrutsky, Dustin said to use your autopep8
> for the merge.).
>
> https://github.com/ewongbb/buildbot/commit/5bc5c49d60ce76efa11c5cdb3af09facc4bb6f38
>
> There's a space after 'Properties:' and pep8 tags it as a
> W291 issue as given:
>
> https://travis-ci.org/buildbot/buildbot/builds/12913927
>
> I'm guessing this is a bug in pep8, though I'm not too sure.
>
> Please clarify.
This is not a bug. PEP8 (http://www.python.org/dev/peps/pep-0008/)
states in Programming Recommendation section :
Don't write string literals that rely on significant trailing
whitespace. Such trailing whitespace is visually indistinguishable and
some editors (or more recently, reindent.py) will trim them.
Buildbot code relies on trailing whitespace in test_changes_changes.py
--- removing it breaks tests.
If that space is critical to buildbot (and if you not 100 % sure, better
to treat it as critical) I suggest to replace that space with escape
sequence \x20:
Comments: fix whitespaceProperties:\x20
P.S. I'm not related to developing pep8 and autopep8 projects (Edmund,
you wrote "your autopep8").
> Edmund
>
>
>
> ------------------------------------------------------------------------------
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
> _______________________________________________
> Buildbot-devel mailing list
> Buildbot-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/buildbot-devel
--
Vladimir Rutsky
More information about the devel
mailing list