Commit d83f6c9f authored by Elias Sagmo Larsen's avatar Elias Sagmo Larsen
Browse files

pylint/views_parameter_indentations

parent 16b7d889
Pipeline #127130 failed with stage
in 25 seconds
......@@ -10,7 +10,9 @@ from rest_framework.filters import OrderingFilter
# Create your views here.
class CommentList(
mixins.ListModelMixin, mixins.CreateModelMixin, generics.GenericAPIView
mixins.ListModelMixin,
mixins.CreateModelMixin,
generics.GenericAPIView
):
# queryset = Comment.objects.all()
serializer_class = CommentSerializer
......@@ -43,7 +45,6 @@ class CommentList(
# The code below is kind of duplicate of the one in ./permissions.py
# We should replace it with a better solution.
# Or maybe not.
qs = Comment.objects.filter(
Q(workout__visibility="PU")
| Q(owner=self.request.user)
......@@ -58,10 +59,10 @@ class CommentList(
# Details of comment
class CommentDetail(
mixins.RetrieveModelMixin,
mixins.UpdateModelMixin,
mixins.DestroyModelMixin,
generics.GenericAPIView,
mixins.RetrieveModelMixin,
mixins.UpdateModelMixin,
mixins.DestroyModelMixin,
generics.GenericAPIView,
):
queryset = Comment.objects.all()
serializer_class = CommentSerializer
......@@ -80,7 +81,11 @@ class CommentDetail(
# List of likes
class LikeList(mixins.ListModelMixin, mixins.CreateModelMixin, generics.GenericAPIView):
class LikeList(
mixins.ListModelMixin,
mixins.CreateModelMixin,
generics.GenericAPIView
):
serializer_class = LikeSerializer
permission_classes = [permissions.IsAuthenticated]
......@@ -99,10 +104,10 @@ class LikeList(mixins.ListModelMixin, mixins.CreateModelMixin, generics.GenericA
# Details of like
class LikeDetail(
mixins.RetrieveModelMixin,
mixins.UpdateModelMixin,
mixins.DestroyModelMixin,
generics.GenericAPIView,
mixins.RetrieveModelMixin,
mixins.UpdateModelMixin,
mixins.DestroyModelMixin,
generics.GenericAPIView,
):
queryset = Like.objects.all()
serializer_class = LikeSerializer
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment