mirror of
https://github.com/github/codeql.git
synced 2026-05-01 03:35:13 +02:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user