Python formatting

This commit is contained in:
Mouse Reeve 2021-03-24 09:34:21 -07:00
parent 94ef9cdd3e
commit a26bf2859b

View file

@ -299,13 +299,10 @@ class Review(Status):
@property
def pure_name(self):
""" clarify review names for mastodon serialization """
if self.rating:
return 'Review of "{}" ({:d} stars): {}'.format(
self.book.title,
self.rating,
self.name,
)
return 'Review of "{}": {}'.format(self.book.title, self.name)
template = get_template("snippets/generated_status/review_pure_name.html")
return template.render(
{"book": self.book, "rating": self.rating, "name": self.name}
).strip()
@property
def pure_content(self):