mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
statement effect inspection adjusted for tuples (PY-3143)
This commit is contained in:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user