Remove-Redundant-Boolean
Documentation Index
Fetch the complete documentation index at: https://docs.sourcery.ai/llms.txt
Use this file to discover all available pages before exploring further.
Sourcery rule id: remove-redundant-boolean
Section titled “Sourcery rule id: remove-redundant-boolean”Description
Section titled “Description”Remove unnecessary boolean value
Before
Section titled “Before”while (first_condition && true && second_condition) { do_something();}while (first_condition && second_condition) { do_something();}Explanation
Section titled “Explanation”This rule removes unnecessary true values from && boolean operators, since
something && true has exactly the same meaning as something