File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
lib/semmle/python/dataflow/new/internal
test/experimental/dataflow/import-star Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ private import python
2
2
private import DataFlowPublic
3
3
import semmle.python.SpecialMethods
4
4
private import semmle.python.essa.SsaCompute
5
+ private import semmle.python.dataflow.new.internal.ImportStar
5
6
6
7
/** Gets the callable in which this node occurs. */
7
8
DataFlowCallable nodeGetEnclosingCallable ( Node n ) { result = n .getEnclosingCallable ( ) }
@@ -927,7 +928,7 @@ predicate jumpStep(Node nodeFrom, Node nodeTo) {
927
928
private predicate module_export ( Module m , string name , CfgNode defn ) {
928
929
exists ( EssaVariable v |
929
930
v .getName ( ) = name and
930
- v .getAUse ( ) = m .getANormalExit ( )
931
+ v .getAUse ( ) = ImportStar :: getStarImported * ( m ) .getANormalExit ( )
931
932
|
932
933
defn .getNode ( ) = v .getDefinition ( ) .( AssignmentDefinition ) .getValue ( )
933
934
or
Original file line number Diff line number Diff line change 1
1
| test3.py:1:17:1:19 | ControlFlowNode for ImportMember | test3.py:2:7:2:9 | ControlFlowNode for foo |
2
2
| 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 |
3
5
| three.py:1:1:1:3 | ControlFlowNode for foo | two.py:2:7:2:9 | ControlFlowNode for foo |
4
6
| 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 |
5
9
| three.py:1:7:1:7 | ControlFlowNode for IntegerLiteral | two.py:2:7:2:9 | ControlFlowNode for foo |
6
10
| trois.py:1:1:1:3 | ControlFlowNode for foo | deux.py:2:7:2:9 | ControlFlowNode for foo |
7
11
| trois.py:1:1:1:3 | ControlFlowNode for foo | test2.py:2:7:2:9 | ControlFlowNode for foo |
8
12
| trois.py:1:7:1:7 | ControlFlowNode for IntegerLiteral | deux.py:2:7:2:9 | ControlFlowNode for foo |
9
13
| 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