New version of black, new whitespace

This commit is contained in:
Mouse Reeve
2021-04-26 09:15:42 -07:00
parent ef83eb33b0
commit 3ade2d3bb1
152 changed files with 1289 additions and 1289 deletions

View File

@ -21,7 +21,7 @@ CurationType = models.TextChoices(
class List(OrderedCollectionMixin, BookWyrmModel):
""" a list of books """
"""a list of books"""
name = fields.CharField(max_length=100)
user = fields.ForeignKey(
@ -41,22 +41,22 @@ class List(OrderedCollectionMixin, BookWyrmModel):
activity_serializer = activitypub.BookList
def get_remote_id(self):
""" don't want the user to be in there in this case """
"""don't want the user to be in there in this case"""
return "https://%s/list/%d" % (DOMAIN, self.id)
@property
def collection_queryset(self):
""" list of books for this shelf, overrides OrderedCollectionMixin """
"""list of books for this shelf, overrides OrderedCollectionMixin"""
return self.books.filter(listitem__approved=True).order_by("listitem")
class Meta:
""" default sorting """
"""default sorting"""
ordering = ("-updated_date",)
class ListItem(CollectionItemMixin, BookWyrmModel):
""" ok """
"""ok"""
book = fields.ForeignKey(
"Edition", on_delete=models.PROTECT, activitypub_field="book"
@ -74,7 +74,7 @@ class ListItem(CollectionItemMixin, BookWyrmModel):
collection_field = "book_list"
def save(self, *args, **kwargs):
""" create a notification too """
"""create a notification too"""
created = not bool(self.id)
super().save(*args, **kwargs)
# tick the updated date on the parent list