Python

Python

Made by DeepSource

Conditional statement used with a constant value PYL-W0125

Anti-pattern
Major

Using a conditional statement with a constant value is pointless and will always evaluate to either True or False. This might not be what is intended.

Bad practice

if 100:
    print('This will always run')

if False:
    print('This will never run')

Recommended

Getting rid of the always True check, and removing the block that is never run will have the same behaviour:

print('This will always run')