Skip to content

Commit 0f94ecd

Browse files
adamchainznessita
authored andcommitted
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.
1 parent 188799e commit 0f94ecd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

django/db/migrations/serializer.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,10 @@ def serialize(self):
9393
return repr(self.value), {"from decimal import Decimal"}
9494

9595

96-
class DeconstructableSerializer(BaseSerializer):
96+
class DeconstructibleSerializer(BaseSerializer):
9797
@staticmethod
9898
def serialize_deconstructed(path, args, kwargs):
99-
name, imports = DeconstructableSerializer._serialize_path(path)
99+
name, imports = DeconstructibleSerializer._serialize_path(path)
100100
strings = []
101101
for arg in args:
102102
arg_string, arg_imports = serializer_factory(arg).serialize()
@@ -231,13 +231,13 @@ def serialize(self):
231231
return value % (", ".join(strings)), imports
232232

233233

234-
class ModelFieldSerializer(DeconstructableSerializer):
234+
class ModelFieldSerializer(DeconstructibleSerializer):
235235
def serialize(self):
236236
attr_name, path, args, kwargs = self.value.deconstruct()
237237
return self.serialize_deconstructed(path, args, kwargs)
238238

239239

240-
class ModelManagerSerializer(DeconstructableSerializer):
240+
class ModelManagerSerializer(DeconstructibleSerializer):
241241
def serialize(self):
242242
as_manager, manager_path, qs_path, args, kwargs = self.value.deconstruct()
243243
if as_manager:
@@ -397,7 +397,7 @@ def serializer_factory(value):
397397
return TypeSerializer(value)
398398
# Anything that knows how to deconstruct itself.
399399
if hasattr(value, "deconstruct"):
400-
return DeconstructableSerializer(value)
400+
return DeconstructibleSerializer(value)
401401
for type_, serializer_cls in Serializer._registry.items():
402402
if isinstance(value, type_):
403403
return serializer_cls(value)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy