File tree Expand file tree Collapse file tree 2 files changed +28
-2
lines changed
lib/semmle/python/frameworks Expand file tree Collapse file tree 2 files changed +28
-2
lines changed Original file line number Diff line number Diff line change @@ -218,7 +218,11 @@ module Tornado {
218218 */
219219 module Application {
220220 /** Gets a reference to the `tornado.web.Application` class. */
221- API:: Node classRef ( ) { result = web ( ) .getMember ( "Application" ) }
221+ API:: Node classRef ( ) {
222+ result = web ( ) .getMember ( "Application" )
223+ or
224+ result = ModelOutput:: getATypeNode ( "tornado.web.Application~Subclass" ) .getASubclass * ( )
225+ }
222226
223227 /**
224228 * A source of instances of `tornado.web.Application`, extend this class to model new instances.
@@ -275,7 +279,12 @@ module Tornado {
275279 */
276280 module HttpServerRequest {
277281 /** Gets a reference to the `tornado.httputil.HttpServerRequest` class. */
278- API:: Node classRef ( ) { result = httputil ( ) .getMember ( "HttpServerRequest" ) }
282+ API:: Node classRef ( ) {
283+ result = httputil ( ) .getMember ( "HttpServerRequest" )
284+ or
285+ result =
286+ ModelOutput:: getATypeNode ( "tornado.httputil.HttpServerRequest~Subclass" ) .getASubclass * ( )
287+ }
279288
280289 /**
281290 * A source of instances of `tornado.httputil.HttpServerRequest`, extend this class to model new instances.
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ private import semmle.python.frameworks.Multidict
2525private import semmle.python.frameworks.Pycurl
2626private import semmle.python.frameworks.RestFramework
2727private import semmle.python.frameworks.SqlAlchemy
28+ private import semmle.python.frameworks.Tornado
2829import semmle.python.frameworks.data.internal.ApiGraphModelsExtensions as Extensions
2930
3031class FlaskViewClasses extends FindSubclassesSpec {
@@ -380,6 +381,22 @@ class StringIO extends FindSubclassesSpec {
380381 override API:: Node getAlreadyModeledClass ( ) { result = StdlibPrivate:: StringIO:: classRef ( ) }
381382}
382383
384+ class TornadoApplication extends FindSubclassesSpec {
385+ TornadoApplication ( ) { this = "tornado.web.Application~Subclass" }
386+
387+ override API:: Node getAlreadyModeledClass ( ) {
388+ result = Tornado:: TornadoModule:: Web:: Application:: classRef ( )
389+ }
390+ }
391+
392+ class TornadoRequest extends FindSubclassesSpec {
393+ TornadoRequest ( ) { this = "tornado.httputil.HttpServerRequest~Subclass" }
394+
395+ override API:: Node getAlreadyModeledClass ( ) {
396+ result = Tornado:: TornadoModule:: HttpUtil:: HttpServerRequest:: classRef ( )
397+ }
398+ }
399+
383400bindingset [ fullyQualified]
384401predicate fullyQualifiedToYamlFormat ( string fullyQualified , string type2 , string path ) {
385402 exists ( int firstDot | firstDot = fullyQualified .indexOf ( "." , 0 , 0 ) |
You can’t perform that action at this time.
0 commit comments