Reports unconditional redeclarations of names without being used in between.

Example:


def x(): pass


x = 2

It applies to function and class declarations, and top-level assignments.

When the warning is shown, you can try a recommended action, for example, you might be prompted to rename the variable.