File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
python/ql/test/query-tests/Statements/general Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 33| test.py:101:5:101:14 | Attribute() | Modification of the locals() dictionary will have no effect on the local variables. |
44| test.py:102:9:102:14 | Subscript | Modification of the locals() dictionary will have no effect on the local variables. |
55| test.py:103:5:103:13 | Attribute() | Modification of the locals() dictionary will have no effect on the local variables. |
6+ | test.py:110:1:110:15 | Subscript | Modification of the locals() dictionary will have no effect on the local variables. |
Original file line number Diff line number Diff line change @@ -104,10 +104,10 @@ def modification_of_locals():
104104 return x
105105
106106
107-
108-
109-
110-
107+ globals ()[ 'foo' ] = 42 # OK
108+ # in module-level scope `locals() == globals()`
109+ # FP report from https://github.com/github/codeql/issues/6674
110+ locals ()[ 'foo' ] = 43 # technically OK
111111
112112
113113#C-style things
You can’t perform that action at this time.
0 commit comments