Add linters configs

This commit is contained in:
2022-01-01 20:13:14 +03:00
parent 3b54f80892
commit 19f6ed111b
18 changed files with 911 additions and 78 deletions

View File

@@ -6,10 +6,10 @@ def get_author_string(author: BookAuthor) -> str:
if author.last_name:
author_parts.append(author.last_name)
if author.first_name:
author_parts.append(author.first_name)
if author.middle_name:
author_parts.append(author.middle_name)
@@ -21,13 +21,11 @@ def get_caption(book: Book) -> str:
caption_authors_parts = []
for author in book.authors:
caption_authors_parts.append(
f"👤 {get_author_string(author)}"
)
caption_authors_parts.append(f"👤 {get_author_string(author)}")
if not caption_authors_parts:
return caption_title
caption_authors = "\n".join(caption_authors_parts)
return caption_title + "\n\n" + caption_authors