Apply suggestions from code review

Co-authored-by: Taus <tausbn@github.com>
This commit is contained in:
yoff
2023-12-04 17:41:00 +01:00
committed by GitHub
parent e091ae84ab
commit f5c176bd12
2 changed files with 0 additions and 11 deletions

View File

@@ -4,16 +4,6 @@ private import semmle.python.dataflow.new.internal.DataFlowPrivate as DataFlowPr
/** Gets the EssaNode that holds the module imported by the fully qualified module name `name` */
DataFlow::CfgNode module_import(string name) {
// exists(Variable var, Import imp, Alias alias |
// alias = imp.getAName() and
// alias.getAsname() = var.getAStore() and
// (
// name = alias.getValue().(ImportMember).getImportedModuleName()
// or
// name = alias.getValue().(ImportExpr).getImportedModuleName()
// ) and
// result.getVar().(AssignmentDefinition).getSourceVariable() = var
// )
exists(Variable var, AssignmentDefinition def, Import imp, Alias alias |
var = def.getSourceVariable() and
result.getNode() = def.getDefiningNode() and

View File

@@ -26,7 +26,6 @@ module TrackedTest implements TestSig {
not e.getLocation().getStartLine() = 0 and
// We do not wish to annotate scope entry definitions,
// as they do not appear in the source code.
// not e.asVar() instanceof ScopeEntryDefinition and
not e.asCfgNode() = any(ScopeEntryDefinition def).getDefiningNode() and
tag = "tracked" and
location = e.getLocation() and