[Erp5-dev] Useless Imports in ERP5
Jérome Perrin
jerome at nexedi.com
Tue Oct 23 13:46:25 CEST 2007
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.
Jérome
More information about the Erp5-dev
mailing list