Python: Add httpx model

This commit is contained in:
Taus
2023-10-10 14:14:58 +00:00
committed by Rasmus Wriedt Larsen
parent 6128c89518
commit 699b6b8bef
2 changed files with 14 additions and 2 deletions

View File

@@ -18,6 +18,7 @@ private import semmle.python.frameworks.Starlette
private import semmle.python.frameworks.ClickhouseDriver
private import semmle.python.frameworks.Aiohttp
private import semmle.python.frameworks.Fabric
private import semmle.python.frameworks.Httpx
import semmle.python.frameworks.data.internal.ApiGraphModelsExtensions as Extensions
class FlaskViewClasses extends FindSubclassesSpec {
@@ -287,6 +288,12 @@ class FlaskBlueprint extends FindSubclassesSpec {
override API::Node getAlreadyModeledClass() { result = Flask::Blueprint::classRef() }
}
class HttpxClient extends FindSubclassesSpec {
HttpxClient() { this = "httpx.Client~Subclass" }
override API::Node getAlreadyModeledClass() { result = HttpxModel::Client::classRef() }
}
bindingset[fullyQualified]
predicate fullyQualifiedToYamlFormat(string fullyQualified, string type2, string path) {
exists(int firstDot | firstDot = fullyQualified.indexOf(".", 0, 0) |