We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d953ad6 commit 9b7a20fCopy full SHA for 9b7a20f
2 files changed
python/ql/test/query-tests/Variables/undefined/UninitializedLocal.expected
@@ -11,4 +11,5 @@
11
| UninitializedLocal.py:163:7:163:7 | x | Local variable 'x' may be used before it is initialized. |
12
| UninitializedLocal.py:176:16:176:16 | x | Local variable 'x' may be used before it is initialized. |
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. |
15
| odasa3987.py:11:8:11:10 | var | Local variable 'var' may be used before it is initialized. |
python/ql/test/query-tests/Variables/undefined/captured.py
@@ -0,0 +1,14 @@
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
+ bar()
+ print(foo)
+topLevel()
0 commit comments