f-strings everywhere

This commit is contained in:
David Lord 2020-04-04 11:39:03 -07:00
parent 524fd0bc8c
commit 2ae740dd49
No known key found for this signature in database
GPG key ID: 7A1C87E3F5BC42A8
35 changed files with 227 additions and 245 deletions

View file

@ -59,7 +59,7 @@ def test_environ_base_default(app, client, app_ctx):
rv = client.get("/")
assert rv.data == b"127.0.0.1"
assert flask.g.user_agent == "werkzeug/" + werkzeug.__version__
assert flask.g.user_agent == f"werkzeug/{werkzeug.__version__}"
def test_environ_base_modified(app, client, app_ctx):
@ -321,7 +321,7 @@ def test_json_request_and_response(app, client):
def test_client_json_no_app_context(app, client):
@app.route("/hello", methods=["POST"])
def hello():
return "Hello, {}!".format(flask.request.json["name"])
return f"Hello, {flask.request.json['name']}!"
class Namespace:
count = 0