Skip to content

comparison-with-itself (PLR0124)#

Derived from the Pylint linter.

What it does#

Checks for operations that compare a name to itself.

Why is this bad?#

Comparing a name to itself always results in the same value, and is likely a mistake.

Example#

foo == foo

References#