Python: Apply autoformat.

This commit is contained in:
Taus Brock-Nannestad
2019-10-03 17:58:52 +02:00
parent 5946a4a066
commit 26da6a1178

View File

@@ -15,8 +15,7 @@ import python
import Definition
predicate unused_local(Name unused, LocalVariable v) {
forex(Definition def |
def.getNode() = unused |
forex(Definition def | def.getNode() = unused |
def.getVariable() = v and
def.isUnused() and
not exists(def.getARedef()) and
@@ -27,9 +26,9 @@ predicate unused_local(Name unused, LocalVariable v) {
)
}
from Name unused, LocalVariable v
where unused_local(unused, v) and
// If unused is part of a tuple, count it as unused if all elements of that tuple are unused.
forall(Name el | el = unused.getParentNode().(Tuple).getAnElt() | unused_local(el, _))
where
unused_local(unused, v) and
// If unused is part of a tuple, count it as unused if all elements of that tuple are unused.
forall(Name el | el = unused.getParentNode().(Tuple).getAnElt() | unused_local(el, _))
select unused, "The value assigned to local variable '" + v.getId() + "' is never used."