Python: Autoformat everything using qlformat.

Will need subsequent PRs fixing up test failures (due to deprecated
methods moving around), but other than that everything should be
straight-forward.
This commit is contained in:
Taus Brock-Nannestad
2020-07-07 15:43:52 +02:00
parent 993506d781
commit f07a7bf8cf
602 changed files with 26777 additions and 26790 deletions

View File

@@ -8,27 +8,27 @@ import semmle.python.pointsto.PointsTo
import semmle.python.pointsto.PointsToContext
predicate trivial(ControlFlowNode f) {
exists(Parameter p | p = f.getNode())
or
f instanceof NameConstantNode
or
f.getNode() instanceof ImmutableLiteral
exists(Parameter p | p = f.getNode())
or
f instanceof NameConstantNode
or
f.getNode() instanceof ImmutableLiteral
}
from int interesting_facts, int interesting_facts_in_source, int total_size, float efficiency
where
interesting_facts =
strictcount(ControlFlowNode f, Object value, ClassObject cls |
f.refersTo(value, cls, _) and not trivial(f)
) and
interesting_facts_in_source =
strictcount(ControlFlowNode f, Object value, ClassObject cls |
f.refersTo(value, cls, _) and
not trivial(f) and
exists(f.getScope().getEnclosingModule().getFile().getRelativePath())
) and
total_size =
strictcount(ControlFlowNode f, PointsToContext ctx, Object value, ClassObject cls,
ControlFlowNode orig | PointsTo::points_to(f, ctx, value, cls, orig)) and
efficiency = 100.0 * interesting_facts_in_source / total_size
interesting_facts =
strictcount(ControlFlowNode f, Object value, ClassObject cls |
f.refersTo(value, cls, _) and not trivial(f)
) and
interesting_facts_in_source =
strictcount(ControlFlowNode f, Object value, ClassObject cls |
f.refersTo(value, cls, _) and
not trivial(f) and
exists(f.getScope().getEnclosingModule().getFile().getRelativePath())
) and
total_size =
strictcount(ControlFlowNode f, PointsToContext ctx, Object value, ClassObject cls,
ControlFlowNode orig | PointsTo::points_to(f, ctx, value, cls, orig)) and
efficiency = 100.0 * interesting_facts_in_source / total_size
select interesting_facts, interesting_facts_in_source, total_size, efficiency