Skip to content

Commit 43bc7c6

Browse files
committed
Python: Autoformat
I'm not particularly happy about this one, but I don't care to fight about it today.
1 parent b7145af commit 43bc7c6

File tree

1 file changed

+6
-29
lines changed
  • python/ql/src/semmle/python/security/strings

1 file changed

+6
-29
lines changed

python/ql/src/semmle/python/security/strings/Basic.qll

Lines changed: 6 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -8,37 +8,14 @@ abstract class StringKind extends TaintKind {
88
StringKind() { this = this }
99

1010
override TaintKind getTaintOfMethodResult(string name) {
11-
name in [
12-
"capitalize",
13-
"casefold",
14-
"center",
15-
"expandtabs",
16-
"format",
17-
"format_map",
18-
"ljust",
19-
"lstrip",
20-
"lower",
21-
"replace",
22-
"rjust",
23-
"rstrip",
24-
"strip",
25-
"swapcase",
26-
"title",
27-
"upper",
28-
"zfill",
29-
/* encode/decode is technically not correct, but close enough */
30-
"encode",
31-
"decode"
32-
] and
11+
name in ["capitalize", "casefold", "center", "expandtabs", "format", "format_map", "ljust",
12+
"lstrip", "lower", "replace", "rjust", "rstrip", "strip", "swapcase", "title", "upper",
13+
"zfill",
14+
/* encode/decode is technically not correct, but close enough */
15+
"encode", "decode"] and
3316
result = this
3417
or
35-
name in [
36-
"partition",
37-
"rpartition",
38-
"rsplit",
39-
"split",
40-
"splitlines"
41-
] and
18+
name in ["partition", "rpartition", "rsplit", "split", "splitlines"] and
4219
result.(SequenceKind).getItem() = this
4320
}
4421

0 commit comments

Comments
 (0)