typing improvements

This commit is contained in:
Jörn-Michael Miehe 2022-08-31 10:21:11 +00:00
parent d4158e37fb
commit 811575536f

View file

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