if-expr-with-twisted-arms (SIM212)
Added in v0.0.214 · Related issues · View source
Derived from the flake8-simplify linter.
Fix is always available.
What it does
Checks for if expressions that check against a negated condition.
Why is this bad?
if expressions that check against a negated condition are more difficult
to read than if expressions that check against the condition directly.
Example
Use instead: