Flake8-comprehensions (C4) --fix go brrr
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import asyncio
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from functools import wraps
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ app = Sanic("Example")
|
||||
|
||||
@app.middleware
|
||||
def log_request(request: Request):
|
||||
logdna.info("I was Here with a new Request to URL: {}".format(request.url))
|
||||
logdna.info(f"I was Here with a new Request to URL: {request.url}")
|
||||
|
||||
|
||||
@app.route("/")
|
||||
|
||||
@@ -20,7 +20,7 @@ def test_sync(request):
|
||||
|
||||
@app.route("/dynamic/<name>/<i:int>")
|
||||
def test_params(request, name, i):
|
||||
return response.text("yeehaww {} {}".format(name, i))
|
||||
return response.text(f"yeehaww {name} {i}")
|
||||
|
||||
|
||||
@app.route("/exception")
|
||||
|
||||
@@ -14,7 +14,7 @@ async def index(request):
|
||||
|
||||
@app.route("/posts/<post_id>")
|
||||
async def post_handler(request, post_id):
|
||||
return response.text("Post - {}".format(post_id))
|
||||
return response.text(f"Post - {post_id}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user