Skip to content

Commit 4059a99

Browse files
committed
Autoformats the query
1 parent acb3c52 commit 4059a99

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

python/ql/src/Expressions/ExpectedMappingForFormatString.ql

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ import python
1414
import semmle.python.strings
1515

1616
from Expr e, ClassValue t
17-
where exists(BinaryExpr b | b.getOp() instanceof Mod and format_string(b.getLeft()) and e = b.getRight() and
18-
mapping_format(b.getLeft()) and e.pointsTo().getClass() = t and not t.isMapping())
19-
select e, "Right hand side of a % operator must be a mapping, not class $@.", t, t.getName()
17+
where
18+
exists(BinaryExpr b |
19+
b.getOp() instanceof Mod and
20+
format_string(b.getLeft()) and
21+
e = b.getRight() and
22+
mapping_format(b.getLeft()) and
23+
e.pointsTo().getClass() = t and
24+
not t.isMapping()
25+
)
26+
select e, "Right hand side of a % operator must be a mapping, not class $@.", t, t.getName()

0 commit comments

Comments
 (0)