typing improvements
This commit is contained in:
parent
d4158e37fb
commit
811575536f
1 changed files with 4 additions and 4 deletions
|
@ -21,7 +21,7 @@ _title = ""
|
||||||
|
|
||||||
|
|
||||||
@router.on_event("startup")
|
@router.on_event("startup")
|
||||||
async def on_startup():
|
async def on_startup() -> None:
|
||||||
global _message, _ticker, _title
|
global _message, _ticker, _title
|
||||||
|
|
||||||
_message = DavFile(CLIENT.resource("message.txt"))
|
_message = DavFile(CLIENT.resource("message.txt"))
|
||||||
|
@ -33,7 +33,7 @@ async def on_startup():
|
||||||
|
|
||||||
|
|
||||||
@router.get("/message")
|
@router.get("/message")
|
||||||
async def get_message():
|
async def get_message() -> str:
|
||||||
return _md.convert(
|
return _md.convert(
|
||||||
str(_message)
|
str(_message)
|
||||||
)
|
)
|
||||||
|
@ -92,12 +92,12 @@ async def get_ticker_commands(
|
||||||
@router.get("/ticker/commands", response_model=list[TickerCommand])
|
@router.get("/ticker/commands", response_model=list[TickerCommand])
|
||||||
async def get_ticker_commands(
|
async def get_ticker_commands(
|
||||||
ticker_commands: Iterator[str] = Depends(get_ticker_commands)
|
ticker_commands: Iterator[str] = Depends(get_ticker_commands)
|
||||||
):
|
) -> list[TickerCommand]:
|
||||||
return list(ticker_commands)
|
return list(ticker_commands)
|
||||||
|
|
||||||
|
|
||||||
@router.get("/title")
|
@router.get("/title")
|
||||||
async def get_title():
|
async def get_title() -> str:
|
||||||
return _md.convert(
|
return _md.convert(
|
||||||
str(_title)
|
str(_title)
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue