linting fixes

- remove unused imports
- add class docstrings
This commit is contained in:
Hugh Rundle
2021-10-05 09:05:20 +11:00
parent 484e9ed959
commit cc8db1c353
2 changed files with 5 additions and 4 deletions

View File

@ -1,6 +1,6 @@
""" do book related things with other users """
from django.apps import apps
from django.db import models, IntegrityError, models, transaction
from django.db import models, IntegrityError, transaction
from django.db.models import Q
from bookwyrm.settings import DOMAIN
from .base_model import BookWyrmModel
@ -36,6 +36,7 @@ class GroupMember(models.Model):
)
class Meta:
"""Users can only have one membership per group"""
constraints = [
models.UniqueConstraint(fields=["group", "user"], name="unique_membership")
]
@ -83,6 +84,7 @@ class GroupMemberInvitation(models.Model):
)
class Meta:
"""Users can only have one outstanding invitation per group"""
constraints = [
models.UniqueConstraint(fields=["group", "user"], name="unique_invitation")
]