[ZODB-Dev] importchecker and the zodb

Martijn Faassen faassen at infrae.com
Thu Feb 26 15:38:07 EST 2004


Jeremy Hylton wrote:

>On Thu, 2004-02-26 at 14:05, Martijn Faassen wrote:
>  
>
>>I have a tool called importchecker which can quite reliably detect 
>>unused imports in large Python packages. It's been used successfully 
>>against Zope 3.
>>
>>http://www.zope.org/Members/faassen/importchecker
>>    
>>
>
>How does it work?  I'm curious about how it differs from pychecker,
>which also complains about the same thing.  Is it as static checker?  Or
>does it depend on code that uses the imported module/name being
>executed.
>
>  
>
It's a static checker, using the compiler module.

http://cvs.infrae.com/tools/importchecker/importchecker.py

>>Should I run it in the ZODB tree or is it okay to run it in the Zope 3 
>>tree -- are these now the same trees in CVS?
>>    
>>
>
>I think they should be the same, but I'm not sure if Zope3 includes all
>the modules that ZODB includes, e.g. zdaemon, ZopeUndo, etc.
>
>  
>

I'll run it against the ZODB CVS module then to be sure.

Regards,

Martijn




More information about the ZODB-Dev mailing list