Skip to content

Commit

Permalink
chore: removed unneeded code
Browse files Browse the repository at this point in the history
to get test coverage back to 100% for this file.
  • Loading branch information
pomegranited committed Jan 4, 2024
1 parent b0563b5 commit 05ea800
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions openedx_tagging/core/tagging/rest_api/v1/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ class ObjectTagUpdateQueryParamsSerializer(serializers.Serializer): # pylint: d
)


class TagDataSerializer(serializers.Serializer):
class TagDataSerializer(serializers.Serializer): # pylint: disable=abstract-method
"""
Serializer for TagData dicts. Also can serialize Tag instances.
Expand Down Expand Up @@ -194,12 +194,6 @@ def to_representation(self, instance: TagData | Tag) -> dict:
data["parent_value"] = instance.parent.value if instance.parent else None
return data

def update(self, instance, validated_data):
raise RuntimeError('`update()` is not supported by the TagData serializer.')

def create(self, validated_data):
raise RuntimeError('`create()` is not supported by the TagData serializer.')


class TaxonomyTagCreateBodySerializer(serializers.Serializer): # pylint: disable=abstract-method
"""
Expand Down Expand Up @@ -273,7 +267,7 @@ class Meta:
]


class TaxonomyImportPlanResponseSerializer(serializers.Serializer):
class TaxonomyImportPlanResponseSerializer(serializers.Serializer): # pylint: disable=abstract-method
"""
Serializer for the response of the Taxonomy Import Plan request
"""
Expand All @@ -290,9 +284,3 @@ def get_plan(self, obj):
return plan.plan()

return None

def update(self, instance, validated_data):
raise RuntimeError('`update()` is not supported by the TagImportTask serializer.')

def create(self, validated_data):
raise RuntimeError('`create()` is not supported by the TagImportTask serializer.')

0 comments on commit 05ea800

Please sign in to comment.