black reformatting

This commit is contained in:
boyska 2023-07-02 18:27:16 +02:00
parent ceea01f7fe
commit 665e95b83b

View file

@ -101,13 +101,14 @@ async def push_message(
async def get_all_variables() -> AllVariablesModel:
return settings.variables
@app.get("/variables/{key}")
async def get_variable(key: str) -> VariableModel:
try:
value = settings.variables[key]
except KeyError:
raise HTTPException(status_code=404, detail="Variable not found")
return Response(str(value), media_type='text/plain')
return Response(str(value), media_type="text/plain")
def first_matching(lst: list, condition: Callable[[Any], bool]) -> int: