jendrikseipp / vulture

Find dead Python code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add argument to filter for unused function, variable or class

SvenWarnke opened this issue · comments

As far as I can see there is no way of telling vulture to only search for e.g. dead functions but not dead variables and classes, etc.

If that was added I could cover the following use case:
only check for unused global variables (written in CAPITAL_STYLE). The reason is, there seem to be a lot of false positives for dead attribute detection and there are other tools that capture this well (e.g. Syntax highlighting).

Also it could enable me to react differently based on which outcome I get, i.e. warning for unused variables but error on unused function.

Hey! Hoping to work on this and get a fix up in the next few weeks.

Happy to discuss a high-level strategy for implementing this, if you want to avoid implementation work.

That would be great, actually! How would you like to get in touch?

Here in the comments is fine.