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 @@ -73,7 +73,11 @@ module Flask {
7373 */
7474 module Blueprint {
7575 /** Gets a reference to the `flask.Blueprint` class. */
76- API:: Node classRef ( ) { result = API:: moduleImport ( "flask" ) .getMember ( "Blueprint" ) }
76+ API:: Node classRef ( ) {
77+ result = API:: moduleImport ( "flask" ) .getMember ( "Blueprint" )
78+ or
79+ result = API:: moduleImport ( "flask" ) .getMember ( "blueprints" ) .getMember ( "Blueprint" )
80+ }
7781
7882 /** Gets a reference to an instance of `flask.Blueprint`. */
7983 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