Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e179df7

Browse files
tausbnRasmusWL
andauthored
Python: Apply suggestions from code review
Co-authored-by: Rasmus Wriedt Larsen <[email protected]>
1 parent 2d3e23e commit e179df7

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • python/ql/test/experimental/dataflow/global-flow

python/ql/test/experimental/dataflow/global-flow/test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
# Modification by reassignment
1919

2020
g_mod = []
21-
# Immediate reassignment -- no modification possible.
21+
# The following assignment should not be a `ModuleVariableNode`, but currently our analysis thinks `g_mod` might be used in the `print` call
2222
g_mod = [10] # $f+:writes=g_mod
23-
print(g_mod) # Could potentially be redefined here.
23+
print("foo")
2424
g_mod = [100] # $writes=g_mod
2525

2626
# Modification by mutation
@@ -37,7 +37,7 @@
3737
else:
3838
g_mult = [300] # $writes=g_mult
3939

40-
# Potential reassignment
40+
# A global with multiple potential definitions
4141

4242
g_mult2 = [400] # $writes=g_mult2
4343
if unknown_module.attr:

0 commit comments

Comments
 (0)