Python: Add support for await in API graphs#5944
Conversation
Running the tests locally would result in thousands of results before this 😱
Before this, I ended up extracting 454 modules locally 😱
I _really_ wanted to call this `.await()`, but that did not fit in with the convention, or the corresponding `getPromised` in JS. https://github.com/github/codeql/blob/54f191cfe37e136bcc7189b2fb01f44dbb01758b/javascript/ql/src/semmle/javascript/ApiGraphs.qll#L184
|
We call the same concept |
Yep I noted that in c4e244e. This is called Awaitables in Python (docs), so I that's what I went with. @erik-krogh are you suggesting that we should also call it |
Purely for inspiration. |
tausbn
left a comment
There was a problem hiding this comment.
This looks good to me. 👍
My knowledge of await is fairly minimal, however, so there is one thing I'm wondering: Is there any situation where the difference between foo and await foo is significant?
By this I mean: what would happen if we were to silently step from the former to the latter, without adding a specifically labelled edge?
Would this result in false positives?
Some context from JavaScript: |
I guess you're thinking about whether we it would be worth it to make things more simple, by just ignoring this? From the top of my head I can't really give any specific examples where silently stepping from
|
|
Talked this over in person with @tausbn, and we decided that doing this automatically would be a bit too magic ✨ so we're going to go with |
Plus a few other minor cleanups