Code review comment for lp:~vila/bzr/323111-orphan-non-versioned-files

Revision history for this message
Andrew Bennetts (spiv) wrote :

Martin Pool wrote:
> Regarding 'import module' - Vincent, if you want this done
> consistently you should put up a proposal to add it to the coding
> standards, together with the rationale and the exceptions. Then we
> can settle it clearly and there won't be case-by-case arguments or
> questions. We could even possibly add rules to pyflakes or something
> to warn about violations.
>
> To me 'lazy_import' actually is a reasonable case for importing the
> particular symbol, because it's clear where it comes from and it seems
> pointlessly redundant to say 'lazy_import.lazy_import'.

Another thing about lazy_import is it usually doesn't make sense to
include it in the main "from bzrlib import (....)" lines, because it is
often used before that point. So it will always tend to have its own
import statement.

I'm also unaware of any actual problems caused by importing the
lazy_import function directly rather than the module, so changing this
convention does seem to have no significant benefit.

« Back to merge proposal