asottile/dead

Detect unused arguments

Closed this issue · 3 comments

A related feature that could be useful would be to detect "dead arguments," or function arguments not used by the function body.

Here is an example of a dead argument found in pip: pypa/pip#7015

definitely doable! potentially has the same issue as inheritance methods for false positives but probably still worth it

false positives

Yeah, but just seeing the list of possibilities could help!

#24 is a first stab at this, it doesn't actually detect the particular case because dead doesn't know about scopes yet (it assumes all symbols are global for now)