From 811575536f651fbe0cb5eeb2c473b2d05e9de485 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= <40151420+ldericher@users.noreply.github.com> Date: Wed, 31 Aug 2022 10:21:11 +0000 Subject: [PATCH] typing improvements --- api/ovkiosk/routers/text.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/ovkiosk/routers/text.py b/api/ovkiosk/routers/text.py index 352df64..c78ab05 100644 --- a/api/ovkiosk/routers/text.py +++ b/api/ovkiosk/routers/text.py @@ -21,7 +21,7 @@ _title = "" @router.on_event("startup") -async def on_startup(): +async def on_startup() -> None: global _message, _ticker, _title _message = DavFile(CLIENT.resource("message.txt")) @@ -33,7 +33,7 @@ async def on_startup(): @router.get("/message") -async def get_message(): +async def get_message() -> str: return _md.convert( str(_message) ) @@ -92,12 +92,12 @@ async def get_ticker_commands( @router.get("/ticker/commands", response_model=list[TickerCommand]) async def get_ticker_commands( ticker_commands: Iterator[str] = Depends(get_ticker_commands) -): +) -> list[TickerCommand]: return list(ticker_commands) @router.get("/title") -async def get_title(): +async def get_title() -> str: return _md.convert( str(_title) )