Derived from the flake8-simplify linter.
Fix is always available.
What it does#
and expressions that contain falsey values.
Why is this bad?#
If the expression is used as a condition, it can be replaced in-full with
In other cases, the expression can be short-circuited to the first falsey value.
False (or the first falsey value), the code is more concise
and easier to understand, since it no longer contains redundant conditions.