Skip to content

Commit aa3f1cf

Browse files
tausbnRasmusWL
authored andcommitted
Python: extend aiohttp model
1 parent b5bffb2 commit aa3f1cf

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

python/ql/lib/semmle/python/frameworks/Aiohttp.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ module AiohttpWebModel {
3232
/** Gets a reference to the `aiohttp.web.View` class or any subclass. */
3333
API::Node subclassRef() {
3434
result = API::moduleImport("aiohttp").getMember("web").getMember("View").getASubclass*()
35+
or
36+
result = ModelOutput::getATypeNode("aiohttp.web.View~Subclass").getASubclass*()
3537
}
3638
}
3739

python/ql/src/meta/ClassHierarchy/Find.ql

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,12 @@ class AiochClient extends FindSubclassesSpec {
431431
override API::Node getAlreadyModeledClass() { result = Aioch::Client::subclassRef() }
432432
}
433433

434+
class AiohttpView extends FindSubclassesSpec {
435+
AiohttpView() { this = "aiohttp.web.View~Subclass" }
436+
437+
override API::Node getAlreadyModeledClass() { result = AiohttpWebModel::View::subclassRef() }
438+
}
439+
434440
bindingset[fullyQualified]
435441
predicate fullyQualifiedToYamlFormat(string fullyQualified, string type2, string path) {
436442
exists(int firstDot | firstDot = fullyQualified.indexOf(".", 0, 0) |

0 commit comments

Comments
 (0)