Is there a simple way to use vulture with django?
dependencies, django, python
Solution
Try Ned's Batchelder `coverage` by itself or use it with `nose`.
Just run through the testcases, and `coverage html` will get you a beautiful reporting showing your code line by line, with detailed coverage information. Trim down/remove unused/untested code afterwards.
Problem
I'm trying to clean up some tangled legacy code in django. Vulture looks like a good bet, but it doesn't seem to know how to find view functions referenced from urls.py. This isn't too surprising, since most of the functions are included as strings: ``` ... url(r'^some-url/$', 'my_app.views.some_url_view'), ... ``` Is there a simple way to make vulture aware of the view functions? One thing I've got going for me: I've written fairly extensive tests for the code. Currently, vulture misses these tests, but if there were some way to make vulture aware of these tests, I think all the views would be included as well.