jendrikseipp / vulture

Find dead Python code
MIT License
3.48k stars 152 forks source link

Option to restrict `unused` types to consider #243

Closed deathiop closed 3 years ago

deathiop commented 3 years ago

Hello,

Would you accept the idea of having a configuration entry / command line flag that allows one to specify

I only want to find unused classes and functions, I don't care about the unused variables and other stuff

?

Something like vulture --unused-classes --unused-variables mydir (though I don't mind any other format).

jendrikseipp commented 3 years ago

I think the best solution for this is to use vulture ... | grep 'unused class\|unused variable' to obtain the results you want to see.

deathiop commented 3 years ago

I do agree I can filter the output. Though, the way I see it is that vulture might skip computing the parts the user is not interested in, hence making it faster than an output filter.