emblacken files

Wouldn't it be great if I just remembered to run Black before every commit?
This commit is contained in:
Hugh Rundle
2021-10-09 22:15:24 +11:00
parent b3cc9e5b75
commit 252ff0d689
4 changed files with 22 additions and 10 deletions

View File

@ -79,7 +79,9 @@ class List(OrderedCollectionMixin, BookWyrmModel):
return queryset.exclude(
~Q( # user isn't following and it isn't their own status and they are not a group member
Q(user__followers=viewer) | Q(user=viewer) | Q(group__memberships__user=viewer)
Q(user__followers=viewer)
| Q(user=viewer)
| Q(group__memberships__user=viewer)
),
privacy="followers", # and the status (of the list) is followers only
)
@ -89,10 +91,10 @@ class List(OrderedCollectionMixin, BookWyrmModel):
"""Override filter for "direct" privacy level to allow group members to see the existence of group lists"""
return queryset.exclude(
~Q( # user not self and not in the group if this is a group list
Q(user=viewer) | Q(group__memberships__user=viewer)
),
privacy="direct"
~Q( # user not self and not in the group if this is a group list
Q(user=viewer) | Q(group__memberships__user=viewer)
),
privacy="direct",
)
@classmethod