On 08/12/2011 07:44 AM, Hans Sebastian wrote:
> Hi all,
> 
> I need some advice about what to do with a pylint result.
> 
> The code in which pylint runs looks similar to this
> 
> try:
>     import module1.submodule1.submodule2.dynamicthing
> except:
>     logger.warn('failed to import dynamicthing')
> 
> And the result is E0611:
> 
> No name 'dynamicthing' in module 'module1.submodule1.submodule2'
> 
> The author of the code argued that pylint fails to see in this case that
> dynamicthing is intended to loaded dynamically in runtime. Loading
> dynamicthing in runtime is indeed the intention of the author. In this
> case what are the things that I can/should do?



you could disable the error for the import statement in question

Just write
import module1.submodule1.submodule2.dynamicthing # pylint: disable=E0611


> _______________________________________________
> Python-Projects mailing list
> [email protected]
> http://lists.logilab.org/mailman/listinfo/python-projects


_______________________________________________
Python-Projects mailing list
[email protected]
http://lists.logilab.org/mailman/listinfo/python-projects

Reply via email to