[U-Boot] [PATCH v5 09/15] tools: add genboardscfg.py

Gerhard Sittig gsi at denx.de
Fri Aug 29 19:43:34 CEST 2014


[ yes, old thread, but might be worth to have in archives ]

On Mon, 2014-07-28 at 04:14 +0100, Simon Glass wrote:
> 
> Hi Masahiro,
> 
> On 27 July 2014 10:05, Masahiro Yamada <yamada.m at jp.panasonic.com> wrote:
> > Hi Simon,
> >
> > On Sat, 26 Jul 2014 01:17:02 +0100
> > Simon Glass <sjg at chromium.org> wrote:
> >
> >> > +
> >> > +import sys
> >> > +import os
> >> > +import errno
> >> > +import shutil
> >> > +import time
> >> > +import subprocess
> >> > +import fnmatch
> >> > +import glob
> >> > +import re
> >> > +import optparse
> >>
> >> You can sort the imports.
> >
> >
> > Sorted alphabetially in v6.
> >
> > Pardon my ignorance, but is there any coding style guide
> > about sorting imports?
> 
> Not really. I have been following PEP8 (which I don't think mentions
> this), but in general in U-Boot we try to sort include files.

There are good reasons.  You immediately will spot duplicates,
you can check for items very quickly and without doubt, and
sorted lists reduce merge conflicts, or dramatically ease their
resolution.  It helps authors, and reviewers, and maintainers all
alike.

Since headers, as well as imports, all should be self contained
and not depend on a specific order, there is no downside either
in the alphasort order.  You might even spot where previously
undetected dependencies are.  One more advantage. :)


virtually yours
Gerhard Sittig
-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr. 5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de


More information about the U-Boot mailing list