jendrikseipp / vulture

Find dead Python code
MIT License
3.38k stars 148 forks source link

detect public functions that can be private #275

Closed uriva closed 2 years ago

uriva commented 2 years ago

I think the information vulture has can be used to easily compute functions that can be marked private (_like_this) by identifying that they are "dead code" wrt all files except the one they are in.

This could be very useful.

jendrikseipp commented 2 years ago

That's an interesting suggestion, but I think it will lead to too many false positives.

uriva commented 2 years ago

the only false positive I can imagine is if they are used outside the repo, but then this is exactly the false positives vulture would return for public functions that are part of the external API. Am I missing something?