From a19a202d3a4e3dbc3b716d866a2f453cd0e851ea Mon Sep 17 00:00:00 2001 From: Joseph Victor Zammit Date: Thu, 30 Mar 2023 12:51:36 +0200 Subject: [PATCH] blacken-docs: Adds commas at the end to make it look identical to pre-black version --- docs/api-guide/caching.md | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/docs/api-guide/caching.md b/docs/api-guide/caching.md index b9a77876d..503acb09e 100644 --- a/docs/api-guide/caching.md +++ b/docs/api-guide/caching.md @@ -31,20 +31,20 @@ class UserViewSet(viewsets.ViewSet): @method_decorator(cache_page(60 * 60 * 2)) @method_decorator(vary_on_cookie) def list(self, request, format=None): - content = {"user_feed": request.user.get_user_feed()} + content = { + "user_feed": request.user.get_user_feed(), + } return Response(content) class ProfileView(APIView): # With auth: cache requested url for each user for 2 hours @method_decorator(cache_page(60 * 60 * 2)) - @method_decorator( - vary_on_headers( - "Authorization", - ) - ) + @method_decorator(vary_on_headers("Authorization")) def get(self, request, format=None): - content = {"user_feed": request.user.get_user_feed()} + content = { + "user_feed": request.user.get_user_feed(), + } return Response(content) @@ -52,7 +52,10 @@ class PostView(APIView): # Cache page for the requested url @method_decorator(cache_page(60 * 60 * 2)) def get(self, request, format=None): - content = {"title": "Post title", "body": "Post content"} + content = { + "title": "Post title", + "body": "Post content", + } return Response(content) ```