Skip to content

Files

Latest commit

 

History

History
21 lines (12 loc) · 296 Bytes

simplify-boolean-expression.md

File metadata and controls

21 lines (12 loc) · 296 Bytes

Pattern: Missing use of simple boolean expression

Issue: -

Description

Emitted when redundant pre-python 2.5 ternary syntax is used.

Example of incorrect code:

value = condition and False or other_value

Example of correct code:

value = other_value