mirror of
https://github.com/github/codeql.git
synced 2026-04-28 02:05:14 +02:00
Python: Autoformat everything
Of course, `StringLiteral` being much longer than `StrConst` meant a bunch of files changed formatting.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user