Python: Support flask.blueprints.Blueprint

Thanks to @haby0 who originally proposed this as part of
https://github.com/github/codeql/pull/6977
This commit is contained in:
Rasmus Wriedt Larsen
2021-10-28 14:02:03 +02:00
parent e8895686f8
commit a33a8fd518
2 changed files with 7 additions and 3 deletions

View File

@@ -73,7 +73,11 @@ module Flask {
*/
module Blueprint {
/** Gets a reference to the `flask.Blueprint` class. */
API::Node classRef() { result = API::moduleImport("flask").getMember("Blueprint") }
API::Node classRef() {
result = API::moduleImport("flask").getMember("Blueprint")
or
result = API::moduleImport("flask").getMember("blueprints").getMember("Blueprint")
}
/** Gets a reference to an instance of `flask.Blueprint`. */
API::Node instance() { result = classRef().getReturn() }