mirror of
https://github.com/github/codeql.git
synced 2026-04-25 00:35:20 +02:00
Python: address review comments
This commit is contained in:
@@ -2,7 +2,7 @@ import python
|
||||
import semmle.python.dataflow.new.DataFlow
|
||||
private import semmle.python.dataflow.new.internal.DataFlowPrivate as DataFlowPrivate
|
||||
|
||||
/** Gets the EssaNode that holds the module imported by the fully qualified module name `name` */
|
||||
/** Gets the `CfgNode` that holds the module imported by the fully qualified module name `name`. */
|
||||
DataFlow::CfgNode module_import(string name) {
|
||||
exists(Variable var, AssignmentDefinition def, Import imp, Alias alias |
|
||||
var = def.getSourceVariable() and
|
||||
|
||||
@@ -15,8 +15,6 @@ module InlinePoorMansFunctionResolutionTest implements TestSig {
|
||||
not exists(FunctionDef def | def.getDefinedFunction() = func |
|
||||
ref.asExpr() = def.getATarget()
|
||||
) and
|
||||
// exclude things like `GSSA variable func`
|
||||
exists(ref.asExpr()) and
|
||||
// exclude decorator calls (which with our extractor rewrites does reference the
|
||||
// function)
|
||||
not ref.asExpr() = func.getDefinition().(FunctionExpr).getADecoratorCall()
|
||||
|
||||
Reference in New Issue
Block a user