Flake8-comprehensions (C4) --fix go brrr

This commit is contained in:
L. Kärkkäinen
2023-10-25 02:28:52 +01:00
parent 9adb6e8ec0
commit 65ba1942cc
81 changed files with 696 additions and 793 deletions

View File

@@ -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}")

View File

@@ -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")

View File

@@ -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