File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
lib/semmle/python/frameworks
test/library-tests/frameworks/flask Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,11 @@ module Flask {
7474 */
7575 module Blueprint {
7676 /** Gets a reference to the `flask.Blueprint` class. */
77- API:: Node classRef ( ) { result = API:: moduleImport ( "flask" ) .getMember ( "Blueprint" ) }
77+ API:: Node classRef ( ) {
78+ result = API:: moduleImport ( "flask" ) .getMember ( "Blueprint" )
79+ or
80+ result = API:: moduleImport ( "flask" ) .getMember ( "blueprints" ) .getMember ( "Blueprint" )
81+ }
7882
7983 /** Gets a reference to an instance of `flask.Blueprint`. */
8084 API:: Node instance ( ) { result = classRef ( ) .getReturn ( ) }
Original file line number Diff line number Diff line change @@ -105,8 +105,8 @@ def bp1_example(foo): # $ requestHandler routedParameter=foo
105105
106106app .register_blueprint (bp1 ) # by default, URLs of blueprints are not prefixed
107107
108-
109- bp2 = flask .Blueprint ("bp2" , __name__ )
108+ import flask . blueprints
109+ bp2 = flask .blueprints . Blueprint ("bp2" , __name__ )
110110
111111@bp2 .route ("/example" ) # $ routeSetup="/example"
112112def bp2_example (): # $ requestHandler
You can’t perform that action at this time.
0 commit comments