This inspection detects redeclarations of names without being used in between, like this:
def x(): pass x = 2
It applies to function and class declarations, and assignments.
Currently it works in a very limited way and is off by default.