[code-quality] Unable to import error from pylint
Martín Ferrari
tincho at tincho.org
Tue Jul 15 00:34:40 CEST 2014
Hi!
This is probably a FAQ, but I cannot find it anywhere in the docs.
I get a F0401 (Unable to import) when importing a flask external module,
which involves a trick on __init__ on the parent package to locate the
actual module, which has a different name (flask.ext.httpauth is in fact
flask_httpauth, with no package name).
I understand that pylint avoids executing code on imports, so that
explains this message.
The question would be: is there a way to fix this situation without
ignoring everything that uses that module? Adding an 'import
flask.ext.httpauth' in the init-hook does not seem to solve it.
Thanks!
--
MartÃn Ferrari (Tincho)
More information about the code-quality
mailing list