Inspectopedia Help

Redeclared names without usages

Reports unconditional redeclarations of names without being used in between.


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.

Inspection Details

Available in:

DataSpell 2023.3, PyCharm 2023.3


Python Community Edition, 233.SNAPSHOT

Last modified: 13 July 2023