Cool project. I think false positives are more important than the dead code it misses at this stage. For example, it marks all Django settings as unused variables, probably because settings are typically not imported directly in Django projects. For example: from django.conf import settings ... if settings.DEBUG: ... Currently unref thinks that DEBUG is not used. Similarly, the `application` variable in asgi.py (or wsgi.py) is passed as an argument to the ASGI/WSGI server executable, but that is also marked as unused.
Thanks, one of my goals was to try and make popular frameworks work well with this tool, and I didn't add Django yet. I'll make a PR to add some basic Django support which should address both of your points.
I wish they made Django a little less “magic”. Virtually every harness has to create workarounds specifically for Django, and simple things like settings probably don’t need to break standard coding practices.
I got a lot of false positives in a Django project too, but trying it on some non-framework tools I've built worked pretty well. Will keep an eye on this, thanks.