New version of black, new whitespace
This commit is contained in:
@ -18,10 +18,10 @@ from .helpers import is_api_request, is_bookwyrm_request
|
||||
# pylint: disable= no-self-use
|
||||
@method_decorator(login_required, name="dispatch")
|
||||
class Feed(View):
|
||||
""" activity stream """
|
||||
"""activity stream"""
|
||||
|
||||
def get(self, request, tab):
|
||||
""" user's homepage with activity feed """
|
||||
"""user's homepage with activity feed"""
|
||||
if not tab in STREAMS:
|
||||
tab = "home"
|
||||
|
||||
@ -46,10 +46,10 @@ class Feed(View):
|
||||
|
||||
@method_decorator(login_required, name="dispatch")
|
||||
class DirectMessage(View):
|
||||
""" dm view """
|
||||
"""dm view"""
|
||||
|
||||
def get(self, request, username=None):
|
||||
""" like a feed but for dms only """
|
||||
"""like a feed but for dms only"""
|
||||
# remove fancy subclasses of status, keep just good ol' notes
|
||||
queryset = models.Status.objects.filter(
|
||||
review__isnull=True,
|
||||
@ -85,10 +85,10 @@ class DirectMessage(View):
|
||||
|
||||
|
||||
class Status(View):
|
||||
""" get posting """
|
||||
"""get posting"""
|
||||
|
||||
def get(self, request, username, status_id):
|
||||
""" display a particular status (and replies, etc) """
|
||||
"""display a particular status (and replies, etc)"""
|
||||
try:
|
||||
user = get_user_from_username(request.user, username)
|
||||
status = models.Status.objects.select_subclasses().get(
|
||||
@ -120,10 +120,10 @@ class Status(View):
|
||||
|
||||
|
||||
class Replies(View):
|
||||
""" replies page (a json view of status) """
|
||||
"""replies page (a json view of status)"""
|
||||
|
||||
def get(self, request, username, status_id):
|
||||
""" ordered collection of replies to a status """
|
||||
"""ordered collection of replies to a status"""
|
||||
# the html view is the same as Status
|
||||
if not is_api_request(request):
|
||||
status_view = Status.as_view()
|
||||
@ -138,7 +138,7 @@ class Replies(View):
|
||||
|
||||
|
||||
def feed_page_data(user):
|
||||
""" info we need for every feed page """
|
||||
"""info we need for every feed page"""
|
||||
if not user.is_authenticated:
|
||||
return {}
|
||||
|
||||
@ -151,7 +151,7 @@ def feed_page_data(user):
|
||||
|
||||
|
||||
def get_suggested_books(user, max_books=5):
|
||||
""" helper to get a user's recent books """
|
||||
"""helper to get a user's recent books"""
|
||||
book_count = 0
|
||||
preset_shelves = [("reading", max_books), ("read", 2), ("to-read", max_books)]
|
||||
suggested_books = []
|
||||
|
Reference in New Issue
Block a user