From 846a86fb62275fb92675319dbd5a20aab5cdba73 Mon Sep 17 00:00:00 2001 From: "Langhammer, Jens" Date: Mon, 28 Oct 2019 14:44:46 +0100 Subject: [PATCH] fix lint --- passbook/api/v2/urls.py | 4 ++-- passbook/audit/api/events.py | 3 +++ passbook/audit/signals.py | 4 ++-- passbook/core/api/applications.py | 3 +++ passbook/core/api/groups.py | 3 +++ passbook/core/api/invitations.py | 3 +++ passbook/core/api/users.py | 3 +++ 7 files changed, 19 insertions(+), 4 deletions(-) diff --git a/passbook/api/v2/urls.py b/passbook/api/v2/urls.py index c0d8a92f4..f3dd2e67d 100644 --- a/passbook/api/v2/urls.py +++ b/passbook/api/v2/urls.py @@ -1,10 +1,11 @@ +"""api v2 urls""" from rest_framework import routers +from passbook.audit.api.events import EventViewSet from passbook.core.api.applications import ApplicationViewSet from passbook.core.api.groups import GroupViewSet from passbook.core.api.invitations import InvitationViewSet from passbook.core.api.users import UserViewSet -from passbook.audit.api.events import EventViewSet router = routers.DefaultRouter() router.register('core/applications', ApplicationViewSet) @@ -12,5 +13,4 @@ router.register('core/invitations', InvitationViewSet) router.register('core/groups', GroupViewSet) router.register('core/users', UserViewSet) router.register('audit/events', EventViewSet) -# router.register('accounts', AccountViewSet) urlpatterns = router.urls diff --git a/passbook/audit/api/events.py b/passbook/audit/api/events.py index 4555c9793..f28c9df00 100644 --- a/passbook/audit/api/events.py +++ b/passbook/audit/api/events.py @@ -1,3 +1,4 @@ +"""Audit API Views""" from rest_framework.serializers import ModelSerializer from rest_framework.viewsets import ReadOnlyModelViewSet @@ -5,6 +6,7 @@ from passbook.audit.models import Event class EventSerializer(ModelSerializer): + """Event Serializer""" class Meta: @@ -13,6 +15,7 @@ class EventSerializer(ModelSerializer): class EventViewSet(ReadOnlyModelViewSet): + """Event Read-Only Viewset""" queryset = Event.objects.all() serializer_class = EventSerializer diff --git a/passbook/audit/signals.py b/passbook/audit/signals.py index ad8dd0d24..643025e55 100644 --- a/passbook/audit/signals.py +++ b/passbook/audit/signals.py @@ -26,10 +26,10 @@ def on_user_signed_up(sender, request, user, **kwargs): def on_invitation_created(sender, request, invitation, **kwargs): """Log Invitation creation""" Event.create(Event.ACTION_INVITE_CREATED, request, - invitation_uuid=invitation.uuid.hex) + invitation_uuid=invitation.uuid.hex) @receiver(invitation_used) def on_invitation_used(sender, request, invitation, **kwargs): """Log Invitation usage""" Event.create(Event.ACTION_INVITE_USED, request, - invitation_uuid=invitation.uuid.hex) + invitation_uuid=invitation.uuid.hex) diff --git a/passbook/core/api/applications.py b/passbook/core/api/applications.py index 8be2731f8..843bb2c31 100644 --- a/passbook/core/api/applications.py +++ b/passbook/core/api/applications.py @@ -1,3 +1,4 @@ +"""Application API Views""" from rest_framework.serializers import ModelSerializer from rest_framework.viewsets import ModelViewSet @@ -5,6 +6,7 @@ from passbook.core.models import Application class ApplicationSerializer(ModelSerializer): + """Application Serializer""" class Meta: @@ -14,6 +16,7 @@ class ApplicationSerializer(ModelSerializer): class ApplicationViewSet(ModelViewSet): + """Application Viewset""" queryset = Application.objects.all() serializer_class = ApplicationSerializer diff --git a/passbook/core/api/groups.py b/passbook/core/api/groups.py index 02a11014e..1ce5d026e 100644 --- a/passbook/core/api/groups.py +++ b/passbook/core/api/groups.py @@ -1,3 +1,4 @@ +"""Groups API Viewset""" from rest_framework.serializers import ModelSerializer from rest_framework.viewsets import ModelViewSet @@ -5,6 +6,7 @@ from passbook.core.models import Group class GroupSerializer(ModelSerializer): + """Group Serializer""" class Meta: @@ -13,6 +15,7 @@ class GroupSerializer(ModelSerializer): class GroupViewSet(ModelViewSet): + """Group Viewset""" queryset = Group.objects.all() serializer_class = GroupSerializer diff --git a/passbook/core/api/invitations.py b/passbook/core/api/invitations.py index 03bd0926d..618f0248f 100644 --- a/passbook/core/api/invitations.py +++ b/passbook/core/api/invitations.py @@ -1,3 +1,4 @@ +"""Invitation API Views""" from rest_framework.serializers import ModelSerializer from rest_framework.viewsets import ModelViewSet @@ -5,6 +6,7 @@ from passbook.core.models import Invitation class InvitationSerializer(ModelSerializer): + """Invitation Serializer""" class Meta: @@ -13,6 +15,7 @@ class InvitationSerializer(ModelSerializer): class InvitationViewSet(ModelViewSet): + """Invitation Viewset""" queryset = Invitation.objects.all() serializer_class = InvitationSerializer diff --git a/passbook/core/api/users.py b/passbook/core/api/users.py index b937db88e..b6cc3c05e 100644 --- a/passbook/core/api/users.py +++ b/passbook/core/api/users.py @@ -1,3 +1,4 @@ +"""User API Views""" from rest_framework.serializers import ModelSerializer from rest_framework.viewsets import ModelViewSet @@ -5,6 +6,7 @@ from passbook.core.models import User class UserSerializer(ModelSerializer): + """User Serializer""" class Meta: @@ -13,6 +15,7 @@ class UserSerializer(ModelSerializer): class UserViewSet(ModelViewSet): + """User Viewset""" queryset = User.objects.all() serializer_class = UserSerializer