mirror of https://github.com/tiangolo/fastapi.git
🎨 [pre-commit.ci] Auto format from pre-commit.com hooks
This commit is contained in:
parent
13440986a1
commit
e5f643c79a
|
|
@ -26,7 +26,9 @@ async def read_items(
|
|||
if id:
|
||||
item = data.get(id)
|
||||
if item is None:
|
||||
raise HTTPException(status_code=404, detail=f"Item with id '{id}' not found")
|
||||
raise HTTPException(
|
||||
status_code=404, detail=f"Item with id '{id}' not found"
|
||||
)
|
||||
else:
|
||||
id, item = random.choice(list(data.items()))
|
||||
return {"id": id, "name": item}
|
||||
|
|
|
|||
Loading…
Reference in New Issue