Re: Detect Unused Modules

2006-10-21 Thread Kamilche
> Nice as it is, but why not use pylint to check this and many other > coding style issues? I made this the first time I mangled some code because pychecker said some modules were not used when they really were. The module wasn't that complex, only 302 lines, but it got it wrong. -- http://mail.

Re: Detect Unused Modules

2006-10-21 Thread Sybren Stuvel
Kamilche enlightened us with: > DetectUnusedModules.py - Detect modules that were imported but not > used in a file. When run directly, this class will check all files > in the current directory. Nice as it is, but why not use pylint to check this and many other coding style issues? Sybren -- S

Detect Unused Modules

2006-10-20 Thread Kamilche
''' DetectUnusedModules.py - Detect modules that were imported but not used in a file. When run directly, this class will check all files in the current directory. ''' import os import tokenize class PrintUnusedModules(object): state = 0 importlist = None linenumbers = None def _