From bb29220ba0c71b09d783ef9b3ef33633b82b4f6e Mon Sep 17 00:00:00 2001 From: Dag Brattli Date: Fri, 19 Jan 2024 08:06:18 +0100 Subject: [PATCH] Fix auto-complete example --- examples/autocomplete/autocomplete.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/autocomplete/autocomplete.py b/examples/autocomplete/autocomplete.py index 5e031bd..30601aa 100644 --- a/examples/autocomplete/autocomplete.py +++ b/examples/autocomplete/autocomplete.py @@ -90,7 +90,7 @@ async def index(request: Request) -> dict[str, Any]: async def init(loop: AbstractEventLoop): port = os.environ.get("PORT", 8080) host = "localhost" - app = web.Application(loop=loop) + app = web.Application() print("Starting server at port: %s" % port) aiohttp_jinja2.setup(app, loader=jinja2.FileSystemLoader(".")) @@ -102,7 +102,7 @@ async def init(loop: AbstractEventLoop): def main(): - loop: AbstractEventLoop = asyncio.get_event_loop() + loop = asyncio.get_event_loop() app, host, port = loop.run_until_complete(init(loop)) web.run_app(app, host=host, port=int(port))