From dce0678b6d19fd210a5862b503ae9dcc7b894410 Mon Sep 17 00:00:00 2001 From: Jeremiah Boby Date: Wed, 10 Jul 2019 04:16:25 +0100 Subject: Give a code a lint --- pydis_site/apps/api/serializers.py | 4 ---- 1 file changed, 4 deletions(-) (limited to 'pydis_site/apps/api/serializers.py') diff --git a/pydis_site/apps/api/serializers.py b/pydis_site/apps/api/serializers.py index 905a7f82..19d4ab8c 100644 --- a/pydis_site/apps/api/serializers.py +++ b/pydis_site/apps/api/serializers.py @@ -75,7 +75,6 @@ class MessageDeletionContextSerializer(ModelSerializer): itself, this serializer also allows for passing the `deletedmessage_set` element which contains messages that were deleted as part of this context. """ - messages = validated_data.pop('deletedmessage_set') deletion_context = MessageDeletionContext.objects.create(**validated_data) for message in messages: @@ -110,7 +109,6 @@ class InfractionSerializer(ModelSerializer): def validate(self, attrs): """Validate data constraints for the given data and abort if it is invalid.""" - infr_type = attrs.get('type') expires_at = attrs.get('expires_at') @@ -133,7 +131,6 @@ class ExpandedInfractionSerializer(InfractionSerializer): def to_representation(self, instance): """Return the dictionary representation of this infraction.""" - ret = super().to_representation(instance) user = User.objects.get(id=ret['user']) @@ -178,7 +175,6 @@ class OffTopicChannelNameSerializer(ModelSerializer): Additionally, this allows off topic channel name routes to simply return an array of names instead of objects, saving on bandwidth. """ - return obj.name -- cgit v1.2.3