Python: Update py/ineffectual-statement

e.(StrConst).isDocString() can only hold if e instanceof StrConst, since we have
that condition on the line above, we can safely remove this condition.
This commit is contained in:
Rasmus Wriedt Larsen
2020-02-11 16:31:48 +01:00
parent 6e349eb6e7
commit 83d40f167b

View File

@@ -125,7 +125,6 @@ predicate python2_print(Expr e) {
predicate no_effect(Expr e) {
not e instanceof StrConst and
not e.(StrConst).isDocString() and
not e.hasSideEffects() and
forall(Expr sub | sub = e.getASubExpression*() |
not side_effecting_binary(sub) and