Skip to content

Commit 75cdd07

Browse files
chore: update import statement (GoogleCloudPlatform#10579)
1 parent ef240c5 commit 75cdd07

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

cloud-sql/mysql/sqlalchemy/main.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
from flask import render_template, Request, Response
15+
import flask
1616

1717
import functions_framework
1818

@@ -26,7 +26,7 @@
2626

2727

2828
@functions_framework.http
29-
def votes(request: Request) -> Response:
29+
def votes(request: flask.Request) -> flask.Response:
3030
"""Handles HTTP requests to our application.
3131
3232
Args:
@@ -44,13 +44,13 @@ def votes(request: Request) -> Response:
4444
migrate_db(db)
4545
if request.method == "GET":
4646
context = get_index_context(db)
47-
return render_template("index.html", **context)
47+
return flask.render_template("index.html", **context)
4848

4949
if request.method == "POST":
5050
team = request.form["team"]
5151
return save_vote(db, team)
5252

53-
return Response(
53+
return flask.Response(
5454
response="Invalid http request. Method not allowed, must be 'GET' or 'POST'",
5555
status=400,
5656
)

cloud-sql/postgres/sqlalchemy/main.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
from flask import render_template, Request, Response
15+
import flask
1616

1717
import functions_framework
1818

@@ -26,7 +26,7 @@
2626

2727

2828
@functions_framework.http
29-
def votes(request: Request) -> Response:
29+
def votes(request: flask.Request) -> flask.Response:
3030
global db
3131
# initialize db within request context
3232
if not db:
@@ -36,13 +36,13 @@ def votes(request: Request) -> Response:
3636
migrate_db(db)
3737
if request.method == "GET":
3838
context = get_index_context(db)
39-
return render_template("index.html", **context)
39+
return flask.render_template("index.html", **context)
4040

4141
if request.method == "POST":
4242
team = request.form["team"]
4343
return save_vote(db, team)
4444

45-
return Response(
45+
return flask.Response(
4646
response="Invalid http request. Method not allowed, must be 'GET' or 'POST'",
4747
status=400,
4848
)

cloud-sql/sql-server/sqlalchemy/main.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
from flask import render_template, Request, Response
15+
import flask
1616

1717
import functions_framework
1818

@@ -26,7 +26,7 @@
2626

2727

2828
@functions_framework.http
29-
def votes(request: Request) -> Response:
29+
def votes(request: flask.Request) -> flask.Response:
3030
global db
3131
# initialize db within request context
3232
if not db:
@@ -36,13 +36,13 @@ def votes(request: Request) -> Response:
3636
migrate_db(db)
3737
if request.method == "GET":
3838
context = get_index_context(db)
39-
return render_template("index.html", **context)
39+
return flask.render_template("index.html", **context)
4040

4141
if request.method == "POST":
4242
team = request.form["team"]
4343
return save_vote(db, team)
4444

45-
return Response(
45+
return flask.Response(
4646
response="Invalid http request. Method not allowed, must be 'GET' or 'POST'",
4747
status=400,
4848
)

0 commit comments

Comments
 (0)