Remove Redundant Condition¶
Sourcery refactoring id:
Remove a redundant condition used during variable assignment
x = y if z else y
x = y
Code may contain redundant statements where a condition is unnecessarily evaluated, and the result will be the same either way. This refactoring detects such redundancy and removes it.