We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dcd448b commit 3d2de03Copy full SHA for 3d2de03
python/ql/test/experimental/dataflow/typetracking/attribute_tests.py
@@ -30,6 +30,15 @@ def test_incompatible_types():
30
x.field = str("Hello") # $str=field str SPURIOUS: int=field int
31
expects_string(x) # $ str=field SPURIOUS: int=field
32
33
+# set in different function
34
+def set_foo(some_class_instance): # $ tracked=foo
35
+ some_class_instance.foo = tracked # $ tracked=foo tracked
36
+
37
+def test_set_x():
38
+ x = SomeClass()
39
+ set_foo(x)
40
+ print(x.foo) # MISSING: tracked
41
42
# ------------------------------------------------------------------------------
43
# Attributes assigned statically to a class
44
0 commit comments