Skip to content

Commit e56dfe7

Browse files
committed
Python: AttrRef getOjbect/1 -> accesses/2
See this thread for discussion: #5926 (comment)
1 parent 3b41c2f commit e56dfe7

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

python/ql/src/semmle/python/dataflow/new/internal/Attributes.qll

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,10 @@ abstract class AttrRef extends Node {
1818
abstract Node getObject();
1919

2020
/**
21-
* Gets the data flow node corresponding to the object whose attribute named
22-
* `attrName` is being read or written.
21+
* Holds if this data flow node accesses attribute named `attrName` on object `object`.
2322
*/
24-
Node getObject(string attrName) {
25-
result = this.getObject() and
26-
attrName = this.getAttributeName()
23+
predicate accesses(Node object, string attrName) {
24+
this.getObject() = object and getAttributeName() = attrName
2725
}
2826

2927
/**

0 commit comments

Comments
 (0)