File tree Expand file tree Collapse file tree
lib/semmle/python/frameworks Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ private import semmle.python.frameworks.internal.SelfRefMixin
1414private import semmle.python.frameworks.Multidict
1515private import semmle.python.frameworks.Yarl
1616private import semmle.python.frameworks.internal.InstanceTaintStepsHelper
17+ private import semmle.python.frameworks.data.ModelsAsData
1718
1819/**
1920 * INTERNAL: Do not use.
@@ -706,19 +707,23 @@ module AiohttpWebModel {
706707}
707708
708709/**
710+ * INTERNAL: Do not use.
711+ *
709712 * Provides models for the web server part (`aiohttp.client`) of the `aiohttp` PyPI package.
710713 * See https://docs.aiohttp.org/en/stable/client.html
711714 */
712- private module AiohttpClientModel {
715+ module AiohttpClientModel {
713716 /**
714717 * Provides models for the `aiohttp.ClientSession` class
715718 *
716719 * See https://docs.aiohttp.org/en/stable/client_reference.html#aiohttp.ClientSession.
717720 */
718721 module ClientSession {
719722 /** Gets a reference to the `aiohttp.ClientSession` class. */
720- private API:: Node classRef ( ) {
723+ API:: Node classRef ( ) {
721724 result = API:: moduleImport ( "aiohttp" ) .getMember ( "ClientSession" )
725+ or
726+ result = ModelOutput:: getATypeNode ( "aiohttp.ClientSession~Subclass" ) .getASubclass * ( )
722727 }
723728
724729 /** Gets a reference to an instance of `aiohttp.ClientSession`. */
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ private import semmle.python.frameworks.Stdlib
1616private import semmle.python.frameworks.Requests
1717private import semmle.python.frameworks.Starlette
1818private import semmle.python.frameworks.ClickhouseDriver
19+ private import semmle.python.frameworks.Aiohttp
1920import semmle.python.frameworks.data.internal.ApiGraphModelsExtensions as Extensions
2021
2122class FlaskViewClasses extends FindSubclassesSpec {
@@ -241,6 +242,14 @@ class ClickhouseClient extends FindSubclassesSpec {
241242 override API:: Node getAlreadyModeledClass ( ) { result = ClickhouseDriver:: Client:: subclassRef ( ) }
242243}
243244
245+ class AiohttpSession extends FindSubclassesSpec {
246+ AiohttpSession ( ) { this = "aiohttp.ClientSession~Subclass" }
247+
248+ override API:: Node getAlreadyModeledClass ( ) {
249+ result = AiohttpClientModel:: ClientSession:: classRef ( )
250+ }
251+ }
252+
244253bindingset [ fullyQualified]
245254predicate fullyQualifiedToYamlFormat ( string fullyQualified , string type2 , string path ) {
246255 exists ( int firstDot | firstDot = fullyQualified .indexOf ( "." , 0 , 0 ) |
You can’t perform that action at this time.
0 commit comments