Skip to content

Commit

Permalink
Blacken summary
Browse files Browse the repository at this point in the history
  • Loading branch information
ehennenfent committed Jan 27, 2024
1 parent 808abc1 commit 3a9ec57
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions live_illustrate/summarize.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@ def work(self, transcription: Transcription) -> Summary | None:
self.logger.info("Summarized %d tokens in %s", token_count, datetime.now() - start)
if response.choices:
return [
Summary.from_transcription(transcription, content.strip())
if (content := choice.message.content)
else None
(
Summary.from_transcription(transcription, content.strip())
if (content := choice.message.content)
else None
)
for choice in response.choices
][-1]
return None
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ dependencies = [

[project.optional-dependencies] # Optional
dev = [
"black",
"black>=24.0,<25.0",
"isort",
"mypy",
"ruff",
Expand Down

0 comments on commit 3a9ec57

Please sign in to comment.