Python: Autoformat everything

Of course, `StringLiteral` being much longer than `StrConst` meant a
bunch of files changed formatting.
This commit is contained in:
Taus
2024-04-17 16:09:45 +00:00
parent 1c68c987b0
commit b484aee39e
10 changed files with 56 additions and 18 deletions

View File

@@ -25,7 +25,8 @@ class WebAppConstantSecretKeySource extends DataFlow::Node {
API::moduleImport("os").getMember("environ").getMember("get").getACall()
] and
cn.getNumArgument() = 2 and
DataFlow::localFlow(any(DataFlow::Node n | n.asExpr() instanceof StringLiteral), cn.getArg(1)) and
DataFlow::localFlow(any(DataFlow::Node n | n.asExpr() instanceof StringLiteral),
cn.getArg(1)) and
this.asExpr() = cn.asExpr()
)
) and

View File

@@ -25,16 +25,22 @@ class UnicodeCompatibilityNormalize extends API::CallNode {
UnicodeCompatibilityNormalize() {
(
this = API::moduleImport("unicodedata").getMember("normalize").getACall() and
this.getParameter(0).getAValueReachingSink().asExpr().(StringLiteral).getText() in ["NFKC", "NFKD"]
this.getParameter(0).getAValueReachingSink().asExpr().(StringLiteral).getText() in [
"NFKC", "NFKD"
]
or
this = API::moduleImport("pyunormalize").getMember("normalize").getACall() and
this.getParameter(0).getAValueReachingSink().asExpr().(StringLiteral).getText() in ["NFKC", "NFKD"]
this.getParameter(0).getAValueReachingSink().asExpr().(StringLiteral).getText() in [
"NFKC", "NFKD"
]
) and
argIdx = 1
or
(
this = API::moduleImport("textnorm").getMember("normalize_unicode").getACall() and
this.getParameter(1).getAValueReachingSink().asExpr().(StringLiteral).getText() in ["NFKC", "NFKD"]
this.getParameter(1).getAValueReachingSink().asExpr().(StringLiteral).getText() in [
"NFKC", "NFKD"
]
or
this = API::moduleImport("unidecode").getMember("unidecode").getACall()
or