Skip to content

Commit 5f62bd0

Browse files
committed
Do some formatting
1 parent 5663450 commit 5f62bd0

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

src/routes/queue/batch/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,6 @@ async def add_batch(
5353
async def queue_batch(
5454
body: QueueBatchBody, priority: int = 0, unique_only: bool = True
5555
) -> QueueBatchReturn:
56-
return await add_batch(set(body.urls) if unique_only else body.urls, priority, unique_only)
56+
return await add_batch(
57+
set(body.urls) if unique_only else body.urls, priority, unique_only
58+
)

src/routes/queue/batch/file.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,19 @@
44
from . import QueueBatchReturn, add_batch
55
from ....main import app
66

7+
78
class QueueBatchFileBody(BaseModel):
89
file: UploadFile
910
tags: list[str] = Field(default_factory=list)
1011

12+
1113
@app.post("/queue/batch/file")
12-
async def queue_batch_file(body: QueueBatchFileBody, priority: int = 0, unique_only: bool = False, ) -> QueueBatchReturn:
14+
async def queue_batch_file(
15+
body: QueueBatchFileBody,
16+
priority: int = 0,
17+
unique_only: bool = False,
18+
) -> QueueBatchReturn:
1319
urls = (await body.file.read()).decode().splitlines(False)
14-
return await add_batch(set(urls) if unique_only else urls, priority, unique_only, tags=body.tags)
20+
return await add_batch(
21+
set(urls) if unique_only else urls, priority, unique_only, tags=body.tags
22+
)

0 commit comments

Comments
 (0)