simplifiable-if-return |
The if statement can be replaced with 'return %s'
|
Emitted when the condition of an if statement can be returned directly (possibly negated). |
simplifiable-if-return-conj |
The if statement can be replaced with 'return %s'
|
Emitted when the condition of an if statement and the returned values can be combined using logical operators. |
simplifiable-if-assignment |
The conditional assignment can be replaced with '%s = %s'
|
Emitted when the condition of an if statement can be assigned directly (possibly negated). |
simplifiable-if-assignment-conj |
The conditional assignment can be replaced with '%s = %s'
|
Emitted when the condition of an if statement and the assigned values can be combined using logical operators. |
simplifiable-if-expr |
The if expression can be replaced with '%s'
|
Emitted when the condition of an if expression can be returned directly (possibly negated). |
simplifiable-if-expr-conj |
The if expression can be replaced with '%s'
|
Emitted when the condition of an if expression and the returned values can be combined using logical operators. |
simplifiable-if-pass |
Use 'if %s: <else body>' instead of 'pass'
|
Emitted when there is an if condition with a pass in the positive branch. |
no-value-in-one-branch-return |
Both branches should return a value explicitly (one returns implicit None)
|
Emitted when one branch returns a value and the other just returns. |
simplifiable-if-nested |
The if statement can be merged with the nested one to 'if %s:'
|
Emitted when the condition of an if statement can be merged with its nested if’s condition using logical operators. |
simplifiable-if-seq |
The if statement can be merged with the following one to 'if %s:'
|
Emitted when the condition of an if statement can be merged with the next if’s condition using logical operators. |
simplifiable-with-abs |
'%s' can be replaced with '%s'
|
Emitted when there is a problem like x < 4 and x > -4 and suggests abs(x) < 4. |
redundant-compare-in-condition |
'%s' can be simplified to '%s'. Simplify the condition if it is on purpose, or change it if it was not.
|
Emitted when there is a problem like x > 4 or x > 3 and suggests x > 3. (ie min{4, 3}) |
redundant-compare-avoidable-with-max-min |
'%s' can be replaced with '%s'
|
Emitted when there is a problem like ‘x > a and x > b’ and suggests x > max(a, b). |
using-compare-instead-of-equal |
'%s' can be replaced with '%s'
|
Emitted when there is a problem like x >= 0 and x <= 0 and suggests x == 0. |
simplifiable-test-by-equals |
'%s' can be replaced with '%s'
|
Emitted when there is a problem like ‘x % 2 == 0 and y % 2 == 0 or x % 2 == 1 and y % 2 == 1’ and suggests ‘x % 2 == y % 2’. |
redundant-condition-part |
'%s' can be replaced with '%s'
|
[REQUIRES Z3] Emitted when there is a problem like ‘A or B’, where A implies B and suggests to simplify the condition to just ‘B’
|
unreachable-elif-else |
This '%s' is unreachable.
|
[REQUIRES Z3] Emitted when the ‘else/elif’ branch is unreachable due to totally exhaustive conditions before.
|
condition-always-true-in-elif |
This 'elif' can be replaced with just 'else'.
|
[REQUIRES Z3] Emitted when a body of ‘elif’ in if statement is always executed when reached.
|
redundant-condition-part-in-elif |
'%s' can be replaced with '%s', because some operands of the '%s' are always %s.
|
[REQUIRES Z3] Emitted when a test condition in ‘elif’ can be simplified, because when the control flow reaches this ‘elif’ we know that some parts of this condition are True (when the condition is ‘and’) or False (when the condition is ‘or’)
|
redundant-condition-part-in-elif-reorder |
Conditions in the if statement can be simplified by reordering elif blocks, we suggest this order: '%s' with these possibly simplified test conditions respectively: '%s'.
|
[REQUIRES Z3] Emitted when elifs in if-statement can be rearanged to get simpler conditions. (by moving some condition higher, parts of conditions below it can become redundant)
|
condition-always-false-in-elif |
The body of this 'elif' is never executed, because its condition is always False when reached.
|
[REQUIRES Z3] Emitted when a condition in elif is always False, when reached.
|
condition-always-true-or-false |
This condition is always %s.
|
[REQUIRES Z3] Emitted when a condition is always True/False regardless of assignment to variables.
|
use-if-elif-else |
The next %d if statements after this one can be elif statements.
|
[REQUIRES Z3] Emmited when there are at least two consecutive if-statements that can be merged into just one if-elif-statement.
But no variables from test conditions are modified. |
use-if-elif-else-modifying |
The next %d if statements after this one can be elif statements.
|
[REQUIRES Z3] Emmited when there are at least two consecutive if-statements that can be merged into just one if-elif-statement.
But some variable from test conditions is modified. |