Skip to content

Commit 3889c8a

Browse files
authored
Python: Use only TApiNode in API::Impl
This ensures that changes to `API::Node` does not invalidate the cached `module Impl`. At present, I don't expect this to have any effect (as the `Node` class is also fairly static, though not explicitly cached), but I can imagine us making some of the `Node` methods have user-extensible behaviour, in which case we definitely do not want this to result in reevaluation of `API::Impl`.
1 parent a09c12a commit 3889c8a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/ql/src/semmle/python/ApiGraphs.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ module API {
452452
* Holds if there is an edge from `pred` to `succ` in the API graph that is labeled with `lbl`.
453453
*/
454454
cached
455-
predicate edge(Node pred, string lbl, Node succ) {
455+
predicate edge(TApiNode pred, string lbl, TApiNode succ) {
456456
/* There's an edge from the root node for each imported module. */
457457
exists(string m |
458458
pred = MkRoot() and

0 commit comments

Comments
 (0)