File tree Expand file tree Collapse file tree
lib/semmle/python/dataflow/new/internal
test/experimental/dataflow/import-star Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ private import python
22private import DataFlowPublic
33import semmle.python.SpecialMethods
44private import semmle.python.essa.SsaCompute
5+ private import semmle.python.dataflow.new.internal.ImportStar
56
67/** Gets the callable in which this node occurs. */
78DataFlowCallable nodeGetEnclosingCallable ( Node n ) { result = n .getEnclosingCallable ( ) }
@@ -927,7 +928,7 @@ predicate jumpStep(Node nodeFrom, Node nodeTo) {
927928private predicate module_export ( Module m , string name , CfgNode defn ) {
928929 exists ( EssaVariable v |
929930 v .getName ( ) = name and
930- v .getAUse ( ) = m .getANormalExit ( )
931+ v .getAUse ( ) = ImportStar :: getStarImported * ( m ) .getANormalExit ( )
931932 |
932933 defn .getNode ( ) = v .getDefinition ( ) .( AssignmentDefinition ) .getValue ( )
933934 or
Original file line number Diff line number Diff line change 11| test3.py:1:17:1:19 | ControlFlowNode for ImportMember | test3.py:2:7:2:9 | ControlFlowNode for foo |
22| three.py:1:1:1:3 | ControlFlowNode for foo | test1.py:2:7:2:9 | ControlFlowNode for foo |
3+ | three.py:1:1:1:3 | ControlFlowNode for foo | test3.py:1:17:1:19 | ControlFlowNode for ImportMember |
4+ | three.py:1:1:1:3 | ControlFlowNode for foo | test3.py:2:7:2:9 | ControlFlowNode for foo |
35| three.py:1:1:1:3 | ControlFlowNode for foo | two.py:2:7:2:9 | ControlFlowNode for foo |
46| three.py:1:7:1:7 | ControlFlowNode for IntegerLiteral | test1.py:2:7:2:9 | ControlFlowNode for foo |
7+ | three.py:1:7:1:7 | ControlFlowNode for IntegerLiteral | test3.py:1:17:1:19 | ControlFlowNode for ImportMember |
8+ | three.py:1:7:1:7 | ControlFlowNode for IntegerLiteral | test3.py:2:7:2:9 | ControlFlowNode for foo |
59| three.py:1:7:1:7 | ControlFlowNode for IntegerLiteral | two.py:2:7:2:9 | ControlFlowNode for foo |
610| trois.py:1:1:1:3 | ControlFlowNode for foo | deux.py:2:7:2:9 | ControlFlowNode for foo |
711| trois.py:1:1:1:3 | ControlFlowNode for foo | test2.py:2:7:2:9 | ControlFlowNode for foo |
812| trois.py:1:7:1:7 | ControlFlowNode for IntegerLiteral | deux.py:2:7:2:9 | ControlFlowNode for foo |
913| trois.py:1:7:1:7 | ControlFlowNode for IntegerLiteral | test2.py:2:7:2:9 | ControlFlowNode for foo |
14+ | two.py:2:7:2:9 | ControlFlowNode for foo | test3.py:1:17:1:19 | ControlFlowNode for ImportMember |
15+ | two.py:2:7:2:9 | ControlFlowNode for foo | test3.py:2:7:2:9 | ControlFlowNode for foo |
You can’t perform that action at this time.
0 commit comments