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 {
74
74
*/
75
75
module Blueprint {
76
76
/** 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
+ }
78
82
79
83
/** Gets a reference to an instance of `flask.Blueprint`. */
80
84
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
105
105
106
106
app .register_blueprint (bp1 ) # by default, URLs of blueprints are not prefixed
107
107
108
-
109
- bp2 = flask .Blueprint ("bp2" , __name__ )
108
+ import flask . blueprints
109
+ bp2 = flask .blueprints . Blueprint ("bp2" , __name__ )
110
110
111
111
@bp2 .route ("/example" ) # $ routeSetup="/example"
112
112
def bp2_example (): # $ requestHandler
You can’t perform that action at this time.
0 commit comments