Skip to content

Commit 89cba21

Browse files
RasmusWLtausbn
andauthored
Python: Apply suggestions from code review
Co-authored-by: Taus <[email protected]>
1 parent 3d2de03 commit 89cba21

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

python/ql/test/experimental/dataflow/typetracking/attribute_tests.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ def set_foo(some_class_instance): # $ tracked=foo
3535
some_class_instance.foo = tracked # $ tracked=foo tracked
3636

3737
def test_set_x():
38-
x = SomeClass()
39-
set_foo(x)
40-
print(x.foo) # MISSING: tracked
38+
x = SomeClass() # $ MISSING: tracked=foo
39+
set_foo(x) # $ MISSING: tracked=foo
40+
print(x.foo) # $ MISSING: tracked=foo tracked
4141

4242
# ------------------------------------------------------------------------------
4343
# Attributes assigned statically to a class
@@ -125,8 +125,8 @@ def __init__(self): # $ tracked=foo
125125
def print_foo(self): # $ MISSING: tracked=foo
126126
print(self.foo) # $ MISSING: tracked=foo tracked
127127

128-
def possibly_uncalled_method(self):
129-
print(self.foo) # $ MISSING: tracked
128+
def possibly_uncalled_method(self): # $ MISSING: tracked=foo
129+
print(self.foo) # $ MISSING: tracked=foo tracked
130130

131131
instance = MyClass2()
132132
print(instance.foo) # $ MISSING: tracked=foo tracked
@@ -142,8 +142,8 @@ def print_self(self): # $ tracked=foo
142142
def print_foo(self): # $ tracked=foo
143143
print(self.foo) # $ tracked=foo tracked
144144

145-
def possibly_uncalled_method(self):
146-
print(self.foo) # $ MISSING: tracked
145+
def possibly_uncalled_method(self): # $ MISSING: tracked=foo
146+
print(self.foo) # $ MISSING: tracked=foo tracked
147147

148148
instance = MyClass3() # $ tracked=foo
149149
instance.print_self() # $ tracked=foo

0 commit comments

Comments
 (0)