Pattern: Use of constant in conditional statement
Issue: -
Emitted when a conditional statement uses a constant value for its test. This might not be what the user intended to do. Review such code to resolve this issue.
Example of incorrect code:
if 2.0: # [using-constant-test]
print "found 2.0"
Example of correct code:
number = 1.0
if (number == 2.0):
print "found 2.0"