News for hackers. Stuff that matters.
Re:Vulture: Find Dead Python Code by caymanjim on Thursday May 06, 2021 @12:03AM (#27059063)
I ran this on a Flask app. The app has no linting issues and decent test coverage. Vulture reported 192 incidences of unused methods/classes/variables/functions, all at "60% confidence" (whatever that means). There might be some legitimately-unused code in there, but this is almost entirely false positives, with the same "confidence".

It seems like people build giant whitelists when using it with Flask, Django, and other frameworks. Given the volume of false positives, it seems like a maintenance burden to me.

Maybe there's some trick to using it effectively, but it's not obvious to me.

Re:Vulture: Find Dead Python Code by richardxia on Thursday May 06, 2021 @12:39AM (#27059218)
I've had some success using it in a Django app where I generate a whitelist from my main branch, and then I run vulture on my feature branch just before I open up a pull request. This way, it doesn't matter how many false positives there are because I'm only really trying to check if my changes cause any new issues. It's still not as good as other languages with better static analysis tools, but it's better than nothing.
Re:Vulture: Find Dead Python Code by petters on Thursday May 06, 2021 @02:15AM (#27059761)
In my experience, you have to set the threshold at 100%. But then it will rarely find anything. It is not essential in CI like pyflakes.