[merge] use lazy imports
Andrew Bennetts
andrew at canonical.com
Tue Oct 10 10:04:30 BST 2006
Martin Pool wrote:
[...]
>
> One downside with this is that tools like pyflakes don't understand it,
> so will not be able to give useful errors on missing imports. On the
> whole that's something I'm prepared to give up: they don't catch many
> things that aren't caught by our tests, and they do generate a lot of
> spurious warnings.
It should be possible to teach pyflakes to treat the lazy imports like real
imports, with a bit of effort. Failing all else, you could write a script that
just copies a .py file minus the lazy_import magic, and run pyflakes on that.
So I agree it's not a big deal that pyflakes as-is doesn't understand it.
-Andrew.
More information about the bazaar
mailing list