File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
python/ql/test/query-tests/Variables/undefined Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change 11
11
| UninitializedLocal.py:163:7:163:7 | x | Local variable 'x' may be used before it is initialized. |
12
12
| UninitializedLocal.py:176:16:176:16 | x | Local variable 'x' may be used before it is initialized. |
13
13
| UninitializedLocal.py:178:16:178:16 | y | Local variable 'y' may be used before it is initialized. |
14
+ | captured.py:8:15:8:17 | foo | Local variable 'foo' may be used before it is initialized. |
14
15
| odasa3987.py:11:8:11:10 | var | Local variable 'var' may be used before it is initialized. |
Original file line number Diff line number Diff line change
1
+ #!/usr/bin/python
2
+
3
+ def topLevel ():
4
+ foo = 3
5
+
6
+ def bar ():
7
+ nonlocal foo
8
+ print (foo ) # FP
9
+ foo = 4
10
+
11
+ bar ()
12
+ print (foo )
13
+
14
+ topLevel ()
You can’t perform that action at this time.
0 commit comments