style: format code using black v23
This commit is contained in:
parent
42879f2aec
commit
22c255700e
46 changed files with 8 additions and 67 deletions
|
|
@ -14,7 +14,6 @@ class MyUserChangeForm(UserChangeForm):
|
|||
|
||||
|
||||
class MyUserCreationForm(UserCreationForm):
|
||||
|
||||
error_message = UserCreationForm.error_messages.update(
|
||||
{"duplicate_username": "This username has already been taken."}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -114,7 +114,6 @@ class UserManager(BaseUserManager):
|
|||
|
||||
|
||||
class User(AbstractUser):
|
||||
|
||||
# First Name and Last Name do not cover name patterns
|
||||
# around the globe.
|
||||
name = models.CharField(_("Name of User"), blank=True, max_length=255)
|
||||
|
|
|
|||
|
|
@ -47,7 +47,6 @@ METHOD_SCOPE_MAPPING = {
|
|||
|
||||
class ScopePermission(permissions.BasePermission):
|
||||
def has_permission(self, request, view):
|
||||
|
||||
if request.method.lower() in ["options", "head"]:
|
||||
return True
|
||||
|
||||
|
|
@ -103,7 +102,6 @@ class ScopePermission(permissions.BasePermission):
|
|||
)
|
||||
|
||||
def has_permission_token(self, token, required_scope):
|
||||
|
||||
if token.is_expired():
|
||||
return False
|
||||
|
||||
|
|
|
|||
|
|
@ -185,7 +185,6 @@ class UserWriteSerializer(serializers.ModelSerializer):
|
|||
|
||||
|
||||
class UserReadSerializer(serializers.ModelSerializer):
|
||||
|
||||
permissions = serializers.SerializerMethodField()
|
||||
full_username = serializers.SerializerMethodField()
|
||||
avatar = common_serializers.AttachmentSerializer(source="get_avatar")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue