statement effect inspection adjusted for tuples (PY-3143)

This commit is contained in:
Dmitry Jemerov
2011-03-21 18:46:28 +01:00
parent 53aa5df9cf
commit bbe17ef421
2 changed files with 10 additions and 0 deletions
@@ -128,6 +128,14 @@ public class PyStatementEffectInspection extends PyInspection {
}
}
}
else if (expression instanceof PyTupleExpression) {
PyExpression[] elements = ((PyTupleExpression)expression).getElements();
for (PyExpression element : elements) {
if (hasEffect(element)) {
return true;
}
}
}
return false;
}
}
@@ -20,3 +20,5 @@ cout << "Hello, world" # must not be reported
len(x) if True else len(y)
(foo())
foo(),