simplifiable-condition / R1726ΒΆ

Message emitted:

Boolean condition "%s" may be simplified to "%s"

Description:

Emitted when a boolean condition is able to be simplified.

Problematic code:

def has_apples(apples) -> bool:
    return bool(apples or False)  # [simplifiable-condition]

Correct code:

def has_apples(apples) -> bool:
    return bool(apples)

Created by the refactoring checker.