mirror of
https://github.com/github/codeql.git
synced 2026-04-26 01:05:15 +02:00
Python: extend aiohttp model
This commit is contained in:
committed by
Rasmus Wriedt Larsen
parent
b5bffb2220
commit
aa3f1cf3e1
@@ -32,6 +32,8 @@ module AiohttpWebModel {
|
||||
/** Gets a reference to the `aiohttp.web.View` class or any subclass. */
|
||||
API::Node subclassRef() {
|
||||
result = API::moduleImport("aiohttp").getMember("web").getMember("View").getASubclass*()
|
||||
or
|
||||
result = ModelOutput::getATypeNode("aiohttp.web.View~Subclass").getASubclass*()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -431,6 +431,12 @@ class AiochClient extends FindSubclassesSpec {
|
||||
override API::Node getAlreadyModeledClass() { result = Aioch::Client::subclassRef() }
|
||||
}
|
||||
|
||||
class AiohttpView extends FindSubclassesSpec {
|
||||
AiohttpView() { this = "aiohttp.web.View~Subclass" }
|
||||
|
||||
override API::Node getAlreadyModeledClass() { result = AiohttpWebModel::View::subclassRef() }
|
||||
}
|
||||
|
||||
bindingset[fullyQualified]
|
||||
predicate fullyQualifiedToYamlFormat(string fullyQualified, string type2, string path) {
|
||||
exists(int firstDot | firstDot = fullyQualified.indexOf(".", 0, 0) |
|
||||
|
||||
Reference in New Issue
Block a user