From 7f610405a00209bc3b2fa07a5887bcc1c274ca21 Mon Sep 17 00:00:00 2001 From: Rasmus Lerchedahl Petersen Date: Thu, 22 Sep 2022 09:18:21 +0200 Subject: [PATCH] Python: move code and harmonize comments --- python/ql/lib/semmle/python/ApiGraphs.qll | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python/ql/lib/semmle/python/ApiGraphs.qll b/python/ql/lib/semmle/python/ApiGraphs.qll index e8a65de6968..a4d47d80188 100644 --- a/python/ql/lib/semmle/python/ApiGraphs.qll +++ b/python/ql/lib/semmle/python/ApiGraphs.qll @@ -746,6 +746,10 @@ module API { lbl = Label::return() and ref = pred.getACall() or + // Awaiting a node that is a use of `base` + lbl = Label::await() and + ref = pred.getAnAwaited() + or // Subclassing a node lbl = Label::subclass() and exists(PY::ClassExpr clsExpr, DataFlow::Node superclass | pred.flowsTo(superclass) | @@ -759,10 +763,6 @@ module API { ref.(DataFlow::ExprNode).getNode().getNode() = clsExpr.getADecoratorCall() ) ) - or - // awaiting - lbl = Label::await() and - ref = pred.getAnAwaited() ) or exists(DataFlow::Node def, PY::CallableExpr fn |