Skip to content

Commit b4ab0b5

Browse files
committed
Python: Modernise Statements/RedundantAssignment
1 parent 79a4d7e commit b4ab0b5

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

python/ql/src/Statements/RedundantAssignment.ql

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,10 @@ predicate same_name(Name n1, Name n2) {
5757
not maybe_defined_in_outer_scope(n2)
5858
}
5959

60-
ClassObject value_type(Attribute a) { a.getObject().refersTo(_, result, _) }
60+
ClassValue value_type(Attribute a) { a.getObject().pointsTo().getClass() = result }
6161

6262
predicate is_property_access(Attribute a) {
63-
// TODO: We need something to model PropertyObject in the Value API
64-
value_type(a).lookupAttribute(a.getName()) instanceof PropertyObject
63+
value_type(a).lookup(a.getName()) instanceof PropertyValue
6564
}
6665

6766
predicate same_attribute(Attribute a1, Attribute a2) {

0 commit comments

Comments
 (0)