Skip to content

Commit e979dff

Browse files
committed
Python: Fix variable access from extractor-change
These changes are from internal PR.
1 parent 985e87c commit e979dff

File tree

5 files changed

+7
-8
lines changed

5 files changed

+7
-8
lines changed

python/ql/test/experimental/dataflow/typetracking/test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,11 +172,11 @@ class MyClass(object):
172172
# Since we define some_value method on the class, flow for some_value gets blocked
173173
# into the methods
174174
def some_value(self):
175-
print(some_value) # $ MISSING: tracked
175+
print(some_value) # $ tracked
176176
print(other_value) # $ tracked
177177

178178
def other_name(self):
179-
print(some_value) # $ MISSING: tracked
179+
print(some_value) # $ tracked
180180
print(other_value) # $ tracked
181181

182182
def with_global_modifier(self):

python/ql/test/library-tests/variables/scopes/access.expected

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44
| in_class.py:0:0:0:0 | Module in_class | Global Variable NameError | in_class.py:17:16:17:24 | NameError |
55
| in_class.py:0:0:0:0 | Module in_class | Global Variable bar | in_class.py:2:1:2:3 | bar |
66
| in_class.py:0:0:0:0 | Module in_class | Global Variable bar | in_class.py:14:15:14:17 | bar |
7+
| in_class.py:0:0:0:0 | Module in_class | Global Variable baz | in_class.py:16:19:16:21 | baz |
78
| in_class.py:0:0:0:0 | Module in_class | Global Variable foo | in_class.py:1:1:1:3 | foo |
9+
| in_class.py:0:0:0:0 | Module in_class | Global Variable foo | in_class.py:13:15:13:17 | foo |
10+
| in_class.py:0:0:0:0 | Module in_class | Global Variable foo | in_class.py:31:17:31:19 | foo |
811
| in_class.py:0:0:0:0 | Module in_class | Global Variable mc | in_class.py:33:1:33:2 | mc |
912
| in_class.py:0:0:0:0 | Module in_class | Global Variable mc | in_class.py:35:1:35:2 | mc |
1013
| in_class.py:0:0:0:0 | Module in_class | Global Variable mc | in_class.py:38:7:38:8 | mc |
@@ -26,12 +29,9 @@
2629
| in_class.py:0:0:0:0 | Module in_class | Global Variable print | in_class.py:41:1:41:5 | print |
2730
| in_class.py:5:1:5:22 | Class MyClass | Local Variable Sub | in_class.py:30:11:30:13 | Sub |
2831
| in_class.py:5:1:5:22 | Class MyClass | Local Variable baz | in_class.py:6:5:6:7 | baz |
29-
| in_class.py:5:1:5:22 | Class MyClass | Local Variable baz | in_class.py:16:19:16:21 | baz |
3032
| in_class.py:5:1:5:22 | Class MyClass | Local Variable baz | in_class.py:28:15:28:17 | baz |
3133
| in_class.py:5:1:5:22 | Class MyClass | Local Variable ex | in_class.py:28:5:28:6 | ex |
3234
| in_class.py:5:1:5:22 | Class MyClass | Local Variable foo | in_class.py:8:9:8:11 | foo |
33-
| in_class.py:5:1:5:22 | Class MyClass | Local Variable foo | in_class.py:13:15:13:17 | foo |
34-
| in_class.py:5:1:5:22 | Class MyClass | Local Variable foo | in_class.py:31:17:31:19 | foo |
3535
| in_class.py:5:1:5:22 | Class MyClass | Local Variable func | in_class.py:24:9:24:12 | func |
3636
| in_class.py:5:1:5:22 | Class MyClass | Local Variable func | in_class.py:28:10:28:13 | func |
3737
| in_class.py:5:1:5:22 | Class MyClass | Local Variable use | in_class.py:11:9:11:11 | use |

python/ql/test/library-tests/variables/scopes/free.expected

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
| Local Variable baz | in_class.py:5:1:5:22 | Class MyClass | in_class.py:11:5:11:18 | Function use |
2-
| Local Variable foo | in_class.py:5:1:5:22 | Class MyClass | in_class.py:11:5:11:18 | Function use |
3-
| Local Variable foo | in_class.py:5:1:5:22 | Class MyClass | in_class.py:30:5:30:22 | Class Sub |
41
| Local Variable local2 | test.py:15:1:15:12 | Function func2 | test.py:17:5:17:23 | Function inner1 |
52
| Local Variable local4 | test.py:22:1:22:26 | Function func3 | test.py:24:5:24:22 | Function inner_outer |
63
| Local Variable local4 | test.py:22:1:22:26 | Function func3 | test.py:25:9:25:27 | Function inner2 |

python/ql/test/library-tests/variables/scopes/globals.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
| Global Variable __package__ | test.py:0:0:0:0 | Module test |
88
| Global Variable bar | in_class.py:0:0:0:0 | Module in_class |
99
| Global Variable base | test.py:0:0:0:0 | Module test |
10+
| Global Variable baz | in_class.py:0:0:0:0 | Module in_class |
1011
| Global Variable foo | in_class.py:0:0:0:0 | Module in_class |
1112
| Global Variable func0 | test.py:0:0:0:0 | Module test |
1213
| Global Variable func1 | test.py:0:0:0:0 | Module test |

python/ql/test/library-tests/variables/scopes/scopes.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
| Global Variable __package__ | test.py:0:0:0:0 | Module test |
88
| Global Variable bar | in_class.py:0:0:0:0 | Module in_class |
99
| Global Variable base | test.py:0:0:0:0 | Module test |
10+
| Global Variable baz | in_class.py:0:0:0:0 | Module in_class |
1011
| Global Variable foo | in_class.py:0:0:0:0 | Module in_class |
1112
| Global Variable func0 | test.py:0:0:0:0 | Module test |
1213
| Global Variable func1 | test.py:0:0:0:0 | Module test |

0 commit comments

Comments
 (0)