Code review comment for lp:~zulcss/nova/nova-lxc

Revision history for this message
Chuck Short (zulcss) wrote :

> nova/tests/test_virt.py:375:20: E111 indentation is not a multiple of four
> self.assertEqual(check(tree),
> ^
> Use 4 spaces per indentation level.
>
> For really old code that you don't want to mess up, you can continue to
> use 8-space tabs.
>
> Okay: a = 1
> Okay: if a == 0:\n a = 1
> E111: a = 1
>
> Okay: for item in items:\n pass
> E112: for item in items:\npass
>
> Okay: a = 1\nb = 2
> E113: a = 1\n b = 2
> nova/virt/disk.py:135:1: W293 blank line contains whitespace
>
> ^
> JCR: Trailing whitespace is superfluous.
> FBM: Except when it occurs as part of a blank line (i.e. the line is
> nothing but whitespace). According to Python docs[1] a line with only
> whitespace is considered a blank line, and is to be ignored. However,
> matching a blank line to its indentation level avoids mistakenly
> terminating a multi-line statement (e.g. class declaration) when
> pasting code into the standard Python interpreter.
>
> [1] http://docs.python.org/reference/lexical_analysis.html#blank-
> lines
>
> The warning returned varies on whether the line itself is blank, for
> easier
> filtering for those who want to indent their blank lines.
>
> Okay: spam(1)
> W291: spam(1)\s
> W293: class Foo(object):\n \n bang = 12

And thats fixed.

« Back to merge proposal