Flake8-comprehensions (C4) --fix go brrr
This commit is contained in:
@@ -23,10 +23,10 @@ for n in range(6):
|
||||
setup="from sanic.response import json",
|
||||
number=100000,
|
||||
)
|
||||
print("Took {} seconds".format(time))
|
||||
print(f"Took {time} seconds")
|
||||
total_time += time
|
||||
times += 1
|
||||
print("Average: {}".format(total_time / times))
|
||||
print(f"Average: {total_time / times}")
|
||||
|
||||
print("Running Old 100,000 times")
|
||||
times = 0
|
||||
@@ -37,7 +37,7 @@ for n in range(6):
|
||||
setup="from sanic.response import json",
|
||||
number=100000,
|
||||
)
|
||||
print("Took {} seconds".format(time))
|
||||
print(f"Took {time} seconds")
|
||||
total_time += time
|
||||
times += 1
|
||||
print("Average: {}".format(total_time / times))
|
||||
print(f"Average: {total_time / times}")
|
||||
|
||||
@@ -28,7 +28,7 @@ def test(request):
|
||||
|
||||
@app.route("/text/<name>/<butt:int>")
|
||||
def rtext(request, name, butt):
|
||||
return text("yeehaww {} {}".format(name, butt))
|
||||
return text(f"yeehaww {name} {butt}")
|
||||
|
||||
|
||||
@app.route("/exception")
|
||||
|
||||
@@ -41,7 +41,7 @@ if __name__ == "__main__":
|
||||
from wsgiref.simple_server import make_server
|
||||
|
||||
try:
|
||||
print("Visit http://localhost:{}/".format(sys.argv[-1]))
|
||||
print(f"Visit http://localhost:{sys.argv[-1]}/")
|
||||
make_server("", int(sys.argv[-1]), main).serve_forever()
|
||||
except KeyboardInterrupt:
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user