[Buildbot-devel] Using pep8 on Buildbot source code

Edmund Wong ewongbb at pw-wspx.org
Fri Oct 25 01:47:11 UTC 2013


Dustin J. Mitchell wrote:
> On Thu, Oct 24, 2013 at 2:59 AM, Vladimir Rutsky
> <rutsky.vladimir at gmail.com> wrote:
>>       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.
>
> That refers to *trailing* whitespace, though.  This is embedded
> whitespace, albiet before a "\n" escape:
>    data += "Properties: \n%s\n\n" % self.getProperties()
>
> I admit that the space is unnecessary in this case, but it does seem
> like pep8 is going beyond its mandate here.  Why not also escape the
> space in
>    data += "Changed By: %s\n" % self.who
> in case self.comments is empty?
>
> Anyway, I don't want to belabor the point, and now that I look more
> closely at the code I think removing that space is fine, but I'll be
> keeping a wary eye on W291 :)

So does that mean I can remove the \s from Properties:\s, or
do I escape it with \0x20?  (looks weird, tbh.)

Edmund




More information about the devel mailing list