[Buildroot] [PATCH 12/14] size-stats-compare: fix code style
Yann E. MORIN
yann.morin.1998 at free.fr
Sat Feb 3 15:24:13 UTC 2018
Thomas, Ricardo, All,
On 2018-01-29 23:13 +0100, Thomas Petazzoni spake thusly:
> On Sun, 21 Jan 2018 22:44:40 -0200, Ricardo Martincoski wrote:
> > Fix these warnings:
> > E129 visually indented line with same indent as next logical line
>
> Really?
>
> > header = next(reader)
> > if (header[0] != 'File name' or header[1] != 'Package name' or
> > - header[2] != 'File size' or header[3] != 'Package size'):
> > + header[2] != 'File size' or header[3] != 'Package size'):
>
> This looks totally bogus to me. The code was properly and nicely
> indented before the change, and now it looks badly indented. Is this
> really what flake8 wants? If so, flake8 is very strange.
I guess it 's probably more about the following line than about hte
previous one:
if (header[0] != 'File name' or header[1] != 'Package name' or
header[2] != 'File size' or header[3] != 'Package size'):
print(("Input file %s does not contain the expected header. Are you "
... where there could be confusion with the 'printf' line.
Maybe the printf line could be indented one-level mnore, instead? Nope,
that does not solve the issue. I guess flake8 does not do look-ahead...
In this case, I would be happy with an exception... # noqa E129
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
More information about the buildroot
mailing list