summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Johnson <me@adamj.eu>2025-05-11 23:03:41 +0200
committernessita <124304+nessita@users.noreply.github.com>2025-05-13 21:42:19 -0300
commit0f94ecd49d1af92d47bfa690ca39d4d71b5091cb (patch)
tree131626037a0204fcf93d3e38c608acaca7bd4a20
parent188799e67c2c497419f448359775930c866fe28d (diff)
Refs #36383, #26151 -- Corrected spelling of DeconstructibleSerializer.
"Deconstructible" is the spelling that Django has settled on, such as for `django.utils.deconstruct`. This commit normalizes a previously-inconsistent class to match the rest of the codebase.
-rw-r--r--django/db/migrations/serializer.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/django/db/migrations/serializer.py b/django/db/migrations/serializer.py
index 094ebb413a..84515fdfcf 100644
--- a/django/db/migrations/serializer.py
+++ b/django/db/migrations/serializer.py
@@ -93,10 +93,10 @@ class DecimalSerializer(BaseSerializer):
return repr(self.value), {"from decimal import Decimal"}
-class DeconstructableSerializer(BaseSerializer):
+class DeconstructibleSerializer(BaseSerializer):
@staticmethod
def serialize_deconstructed(path, args, kwargs):
- name, imports = DeconstructableSerializer._serialize_path(path)
+ name, imports = DeconstructibleSerializer._serialize_path(path)
strings = []
for arg in args:
arg_string, arg_imports = serializer_factory(arg).serialize()
@@ -231,13 +231,13 @@ class IterableSerializer(BaseSerializer):
return value % (", ".join(strings)), imports
-class ModelFieldSerializer(DeconstructableSerializer):
+class ModelFieldSerializer(DeconstructibleSerializer):
def serialize(self):
attr_name, path, args, kwargs = self.value.deconstruct()
return self.serialize_deconstructed(path, args, kwargs)
-class ModelManagerSerializer(DeconstructableSerializer):
+class ModelManagerSerializer(DeconstructibleSerializer):
def serialize(self):
as_manager, manager_path, qs_path, args, kwargs = self.value.deconstruct()
if as_manager:
@@ -397,7 +397,7 @@ def serializer_factory(value):
return TypeSerializer(value)
# Anything that knows how to deconstruct itself.
if hasattr(value, "deconstruct"):
- return DeconstructableSerializer(value)
+ return DeconstructibleSerializer(value)
for type_, serializer_cls in Serializer._registry.items():
if isinstance(value, type_):
return serializer_cls(value)