Python: Add clickhouse_driver model

This commit is contained in:
Taus
2023-10-10 14:01:24 +00:00
committed by Rasmus Wriedt Larsen
parent 83e6e51e95
commit f5bed2d955
2 changed files with 11 additions and 0 deletions

View File

@@ -15,6 +15,7 @@ private import semmle.python.frameworks.Tornado
private import semmle.python.frameworks.Stdlib
private import semmle.python.frameworks.Requests
private import semmle.python.frameworks.Starlette
private import semmle.python.frameworks.ClickhouseDriver
import semmle.python.frameworks.data.internal.ApiGraphModelsExtensions as Extensions
class FlaskViewClasses extends FindSubclassesSpec {
@@ -234,6 +235,12 @@ class StarletteWebsocket extends FindSubclassesSpec {
override API::Node getAlreadyModeledClass() { result = Starlette::WebSocket::classRef() }
}
class ClickhouseClient extends FindSubclassesSpec {
ClickhouseClient() { this = "clickhouse_driver.client.Client~Subclass" }
override API::Node getAlreadyModeledClass() { result = ClickhouseDriver::Client::subclassRef() }
}
bindingset[fullyQualified]
predicate fullyQualifiedToYamlFormat(string fullyQualified, string type2, string path) {
exists(int firstDot | firstDot = fullyQualified.indexOf(".", 0, 0) |