Skip to content

Commit 01e10e5

Browse files
committed
fix linter failures
1 parent 1793551 commit 01e10e5

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

backend/app/api/assistants.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,9 @@ async def delete_assistant(
9494
assistant = await storage.get_assistant(user["user_id"], aid)
9595
if not assistant:
9696
raise HTTPException(status_code=404, detail="Assistant not found")
97-
if not assistant.get('public') and assistant.get('user_id') != user["user_id"]:
98-
raise HTTPException(status_code=403, detail="Unauthorized to delete this assistant")
97+
if not assistant.get("public") and assistant.get("user_id") != user["user_id"]:
98+
raise HTTPException(
99+
status_code=403, detail="Unauthorized to delete this assistant"
100+
)
99101
await storage.delete_assistant(user["user_id"], aid)
100102
return {"status": "ok"}

backend/app/storage.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -212,16 +212,10 @@ async def delete_thread(user_id: str, thread_id: str):
212212

213213

214214
async def delete_assistant(user_id: str, assistant_id: str):
215-
"""Delete an assistant by ID.
216-
217-
Args:
218-
user_id: The user's ID.
219-
assistant_id: The assistant's ID.
220-
221-
"""
215+
"""Delete an assistant by ID."""
222216
async with get_pg_pool().acquire() as conn:
223217
await conn.execute(
224218
"DELETE FROM assistant WHERE assistant_id = $1 AND user_id = $2",
225219
assistant_id,
226220
user_id,
227-
)
221+
)

0 commit comments

Comments
 (0)