Python: Autoformat

I'm not particularly happy about this one, but I don't care to fight about it today.
This commit is contained in:
Rasmus Wriedt Larsen
2020-04-20 16:08:53 +02:00
parent b7145af447
commit 43bc7c6619

View File

@@ -8,37 +8,14 @@ abstract class StringKind extends TaintKind {
StringKind() { this = this }
override TaintKind getTaintOfMethodResult(string name) {
name in [
"capitalize",
"casefold",
"center",
"expandtabs",
"format",
"format_map",
"ljust",
"lstrip",
"lower",
"replace",
"rjust",
"rstrip",
"strip",
"swapcase",
"title",
"upper",
"zfill",
/* encode/decode is technically not correct, but close enough */
"encode",
"decode"
] and
name in ["capitalize", "casefold", "center", "expandtabs", "format", "format_map", "ljust",
"lstrip", "lower", "replace", "rjust", "rstrip", "strip", "swapcase", "title", "upper",
"zfill",
/* encode/decode is technically not correct, but close enough */
"encode", "decode"] and
result = this
or
name in [
"partition",
"rpartition",
"rsplit",
"split",
"splitlines"
] and
name in ["partition", "rpartition", "rsplit", "split", "splitlines"] and
result.(SequenceKind).getItem() = this
}