[Erp5-dev] Useless Imports in ERP5

Rafael Monnerat rafael at nexedi.com
Tue Oct 23 15:16:23 CEST 2007


Hi Jerome

Jérome Perrin escreveu:
> Rafael Monnerat a écrit :
>> I was testing a little bit the pyflakes (nice tool), I saw that there is 
>> many non used imports at Documents Like Contraints , Interfaces, 
>> GetToolByName ... I removed in some files but I don't know if should be 
>> kept for another reason or is right remove it.
>>
>> What should be done with these imports?
> 
> Removing unused import will take ages, for now what's important is that
> we don't add more. If you want to remove some, go ahead, but make sure 
> that they are really unused, sometimes importing a module have sides 
> effects.
> Actually undefined names are the real problem, there are still some in 
> ERP5 products and business templates.
> BTW, we have a tool to run pyflakes on python scripts inside business
> templates, it's called erp5flakes and it's on pypi.

I started to erp5flakes (I download from erp5 svn) and it's quite nice.
This tool should be integrated at erp5_forge, save a lot of time of
devolopment.

> Jérome
> 

Rafael



More information about the Erp5-dev mailing list