@@ -1271,23 +1271,26 @@ module PrivateDjango {
12711271 }
12721272
12731273 /** An attribute read on an django request that is a `MultiValueDict` instance. */
1274- private class DjangoHttpRequestMultiValueDictInstances extends Django:: MultiValueDict:: InstanceSource {
1274+ private class DjangoHttpRequestMultiValueDictInstances extends Django:: MultiValueDict:: InstanceSource
1275+ {
12751276 DjangoHttpRequestMultiValueDictInstances ( ) {
12761277 this .( DataFlow:: AttrRead ) .getObject ( ) = instance ( ) and
12771278 this .( DataFlow:: AttrRead ) .getAttributeName ( ) in [ "GET" , "POST" , "FILES" ]
12781279 }
12791280 }
12801281
12811282 /** An attribute read on an django request that is a `ResolverMatch` instance. */
1282- private class DjangoHttpRequestResolverMatchInstances extends Django:: ResolverMatch:: InstanceSource {
1283+ private class DjangoHttpRequestResolverMatchInstances extends Django:: ResolverMatch:: InstanceSource
1284+ {
12831285 DjangoHttpRequestResolverMatchInstances ( ) {
12841286 this .( DataFlow:: AttrRead ) .getObject ( ) = instance ( ) and
12851287 this .( DataFlow:: AttrRead ) .getAttributeName ( ) = "resolver_match"
12861288 }
12871289 }
12881290
12891291 /** An `UploadedFile` instance that originates from a django request. */
1290- private class DjangoHttpRequestUploadedFileInstances extends Django:: UploadedFile:: InstanceSource {
1292+ private class DjangoHttpRequestUploadedFileInstances extends Django:: UploadedFile:: InstanceSource
1293+ {
12911294 DjangoHttpRequestUploadedFileInstances ( ) {
12921295 // TODO: this currently only works in local-scope, since writing type-trackers for
12931296 // this is a little too much effort. Once API-graphs are available for more
@@ -1421,7 +1424,8 @@ module PrivateDjango {
14211424 * Use the predicate `HttpResponseRedirect::instance()` to get references to instances of `django.http.response.HttpResponseRedirect`.
14221425 */
14231426 abstract class InstanceSource extends HttpResponse:: InstanceSource ,
1424- Http:: Server:: HttpRedirectResponse:: Range , DataFlow:: Node { }
1427+ Http:: Server:: HttpRedirectResponse:: Range , DataFlow:: Node
1428+ { }
14251429
14261430 /** A direct instantiation of `django.http.response.HttpResponseRedirect`. */
14271431 private class ClassInstantiation extends InstanceSource , DataFlow:: CallCfgNode {
@@ -1483,7 +1487,8 @@ module PrivateDjango {
14831487 * Use the predicate `HttpResponsePermanentRedirect::instance()` to get references to instances of `django.http.response.HttpResponsePermanentRedirect`.
14841488 */
14851489 abstract class InstanceSource extends HttpResponse:: InstanceSource ,
1486- Http:: Server:: HttpRedirectResponse:: Range , DataFlow:: Node { }
1490+ Http:: Server:: HttpRedirectResponse:: Range , DataFlow:: Node
1491+ { }
14871492
14881493 /** A direct instantiation of `django.http.response.HttpResponsePermanentRedirect`. */
14891494 private class ClassInstantiation extends InstanceSource , DataFlow:: CallCfgNode {
@@ -2086,7 +2091,8 @@ module PrivateDjango {
20862091 *
20872092 * See https://docs.djangoproject.com/en/3.1/ref/request-response/#django.http.HttpResponse.write
20882093 */
2089- class HttpResponseWriteCall extends Http:: Server:: HttpResponse:: Range , DataFlow:: CallCfgNode {
2094+ class HttpResponseWriteCall extends Http:: Server:: HttpResponse:: Range , DataFlow:: CallCfgNode
2095+ {
20902096 DjangoImpl:: DjangoHttp:: Response:: HttpResponse:: InstanceSource instance ;
20912097
20922098 HttpResponseWriteCall ( ) { this .getFunction ( ) = write ( instance ) }
@@ -2106,7 +2112,8 @@ module PrivateDjango {
21062112 * A call to `set_cookie` on a HTTP Response.
21072113 */
21082114 class DjangoResponseSetCookieCall extends Http:: Server:: CookieWrite:: Range ,
2109- DataFlow:: MethodCallNode {
2115+ DataFlow:: MethodCallNode
2116+ {
21102117 DjangoResponseSetCookieCall ( ) {
21112118 this .calls ( DjangoImpl:: DjangoHttp:: Response:: HttpResponse:: instance ( ) , "set_cookie" )
21122119 }
@@ -2126,7 +2133,8 @@ module PrivateDjango {
21262133 * A call to `delete_cookie` on a HTTP Response.
21272134 */
21282135 class DjangoResponseDeleteCookieCall extends Http:: Server:: CookieWrite:: Range ,
2129- DataFlow:: MethodCallNode {
2136+ DataFlow:: MethodCallNode
2137+ {
21302138 DjangoResponseDeleteCookieCall ( ) {
21312139 this .calls ( DjangoImpl:: DjangoHttp:: Response:: HttpResponse:: instance ( ) , "delete_cookie" )
21322140 }
@@ -2429,7 +2437,8 @@ module PrivateDjango {
24292437
24302438 /** A request handler defined in a django view class, that has no known route. */
24312439 private class DjangoViewClassHandlerWithoutKnownRoute extends Http:: Server:: RequestHandler:: Range ,
2432- DjangoRouteHandler {
2440+ DjangoRouteHandler
2441+ {
24332442 DjangoViewClassHandlerWithoutKnownRoute ( ) {
24342443 exists ( DjangoViewClass vc | vc .getARequestHandler ( ) = this ) and
24352444 not exists ( DjangoRouteSetup setup | setup .getARequestHandler ( ) = this )
@@ -2587,7 +2596,8 @@ module PrivateDjango {
25872596 // ---------------------------------------------------------------------------
25882597 /** A parameter that will receive the django `HttpRequest` instance when a request handler is invoked. */
25892598 private class DjangoRequestHandlerRequestParam extends DjangoImpl:: DjangoHttp:: Request:: HttpRequest:: InstanceSource ,
2590- RemoteFlowSource:: Range , DataFlow:: ParameterNode {
2599+ RemoteFlowSource:: Range , DataFlow:: ParameterNode
2600+ {
25912601 DjangoRequestHandlerRequestParam ( ) {
25922602 this .getParameter ( ) = any ( DjangoRouteSetup setup ) .getARequestHandler ( ) .getRequestParam ( )
25932603 or
@@ -2604,7 +2614,8 @@ module PrivateDjango {
26042614 * See https://docs.djangoproject.com/en/3.1/topics/class-based-views/generic-display/#dynamic-filtering
26052615 */
26062616 private class DjangoViewClassRequestAttributeRead extends DjangoImpl:: DjangoHttp:: Request:: HttpRequest:: InstanceSource ,
2607- RemoteFlowSource:: Range , DataFlow:: Node {
2617+ RemoteFlowSource:: Range , DataFlow:: Node
2618+ {
26082619 DjangoViewClassRequestAttributeRead ( ) {
26092620 exists ( DataFlow:: AttrRead read | this = read |
26102621 read .getObject ( ) = any ( DjangoViewClass vc ) .getASelfRef ( ) and
@@ -2624,7 +2635,8 @@ module PrivateDjango {
26242635 * See https://docs.djangoproject.com/en/3.1/topics/class-based-views/generic-display/#dynamic-filtering
26252636 */
26262637 private class DjangoViewClassRoutedParamsAttributeRead extends RemoteFlowSource:: Range ,
2627- DataFlow:: Node {
2638+ DataFlow:: Node
2639+ {
26282640 DjangoViewClassRoutedParamsAttributeRead ( ) {
26292641 exists ( DataFlow:: AttrRead read | this = read |
26302642 read .getObject ( ) = any ( DjangoViewClass vc ) .getASelfRef ( ) and
@@ -2652,7 +2664,8 @@ module PrivateDjango {
26522664 * - https://docs.djangoproject.com/en/3.1/topics/http/file-uploads/#handling-uploaded-files-with-a-model
26532665 */
26542666 private class DjangoFileFieldUploadToFunctionFilenameParam extends RemoteFlowSource:: Range ,
2655- DataFlow:: ParameterNode {
2667+ DataFlow:: ParameterNode
2668+ {
26562669 DjangoFileFieldUploadToFunctionFilenameParam ( ) {
26572670 exists ( DataFlow:: CallCfgNode call , DataFlow:: Node uploadToArg , Function func |
26582671 this .getParameter ( ) = func .getArg ( 1 ) and
@@ -2679,7 +2692,8 @@ module PrivateDjango {
26792692 * See https://docs.djangoproject.com/en/3.1/topics/http/shortcuts/#redirect
26802693 */
26812694 private class DjangoShortcutsRedirectCall extends Http:: Server:: HttpRedirectResponse:: Range ,
2682- DataFlow:: CallCfgNode {
2695+ DataFlow:: CallCfgNode
2696+ {
26832697 DjangoShortcutsRedirectCall ( ) { this = DjangoImpl:: Shortcuts:: redirect ( ) .getACall ( ) }
26842698
26852699 /**
@@ -2713,7 +2727,8 @@ module PrivateDjango {
27132727 * See https://docs.djangoproject.com/en/3.1/ref/class-based-views/base/#redirectview
27142728 */
27152729 private class DjangoRedirectViewGetRedirectUrlReturn extends Http:: Server:: HttpRedirectResponse:: Range ,
2716- DataFlow:: CfgNode {
2730+ DataFlow:: CfgNode
2731+ {
27172732 DjangoRedirectViewGetRedirectUrlReturn ( ) {
27182733 node = any ( GetRedirectUrlFunction f ) .getAReturnValueFlowNode ( )
27192734 }
0 commit comments