Format with default line-length=88 (was 79 with Sanic).

This commit is contained in:
L. Kärkkäinen
2023-10-25 04:13:13 +01:00
parent e4daf1ab21
commit 1afea39cb2
137 changed files with 540 additions and 1613 deletions

View File

@@ -35,9 +35,7 @@ def proxy(request, path):
@https.main_process_start
async def start(app, _):
http_server = await http.create_server(
port=HTTP_PORT, return_asyncio_server=True
)
http_server = await http.create_server(port=HTTP_PORT, return_asyncio_server=True)
app.add_task(runner(http, http_server))
app.ctx.http_server = http_server
app.ctx.http = http

View File

@@ -33,9 +33,7 @@ logdna_options = {
"mac": get_mac_address(),
}
logdna_handler = LogDNAHandler(
getenv("LOGDNA_API_KEY"), options=logdna_options
)
logdna_handler = LogDNAHandler(getenv("LOGDNA_API_KEY"), options=logdna_options)
logdna = logging.getLogger(__name__)
logdna.setLevel(logging.INFO)

View File

@@ -42,9 +42,7 @@ async def handler_file(request):
@app.route("/file_stream")
async def handler_file_stream(request):
return await response.file_stream(
Path("../") / "setup.py", chunk_size=1024
)
return await response.file_stream(Path("../") / "setup.py", chunk_size=1024)
@app.post("/stream", stream=True)

View File

@@ -36,9 +36,7 @@ async def test(request):
if __name__ == "__main__":
asyncio.set_event_loop(uvloop.new_event_loop())
serv_coro = app.create_server(
host="0.0.0.0", port=8000, return_asyncio_server=True
)
serv_coro = app.create_server(host="0.0.0.0", port=8000, return_asyncio_server=True)
loop = asyncio.get_event_loop()
serv_task = asyncio.ensure_future(serv_coro, loop=loop)
signal(SIGINT, lambda s, f: loop.stop())

View File

@@ -42,9 +42,7 @@ async def test_file(request):
@app.route("/file_stream")
async def test_file_stream(request):
return await response.file_stream(
os.path.abspath("setup.py"), chunk_size=1024
)
return await response.file_stream(os.path.abspath("setup.py"), chunk_size=1024)
# ----------------------------------------------- #

View File

@@ -11,9 +11,7 @@ app = Sanic("Example")
bp = Blueprint("bp", host="bp.example.com")
@app.route(
"/", host=["example.com", "somethingelse.com", "therestofyourdomains.com"]
)
@app.route("/", host=["example.com", "somethingelse.com", "therestofyourdomains.com"])
async def hello_0(request):
return response.text("Some defaults")