Skip to content

Commit 51d552c

Browse files
fix: apply black 24.10.0 formatting
1 parent 3e25023 commit 51d552c

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

news/tasks.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ def generate_summary(
2222
"""Build the summarization prompt and call OpenRouter synchronously.
2323
2424
Plain function (no Celery decoration) so callers can use it inline with an
25-
explicit ``timeout``.
26-
Background callers go through ``summarize_content`` below, which wraps this
25+
explicit ``timeout``.
26+
Background callers go through ``summarize_content`` below, which wraps this
2727
in a Celery task so ``autoretry_for=(OpenAIError,)`` and ``max_retries`` fire.
2828
2929
Raises ValueError on empty content, OpenAIError on API failures.
@@ -76,9 +76,7 @@ def generate_summary(
7676
except (AttributeError, IndexError) as e:
7777
logger.error(f"Error getting summarized content: {e=}")
7878
return None
79-
logger.info(
80-
f"Received summarized content for {summary[:100]=}: {len(summary)=}..."
81-
)
79+
logger.info(f"Received summarized content for {summary[:100]=}: {len(summary)=}...")
8280
return summary
8381

8482

news/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ def generate_description(request):
598598
return JsonResponse({"error": "Add some content first."}, status=400)
599599

600600
try:
601-
# Call the plain helper
601+
# Call the plain helper
602602
summary = generate_summary(
603603
content,
604604
title,

0 commit comments

Comments
 (0)