diff --git a/django/db/migrations/graph.py b/django/db/migrations/graph.py index e8c67184a5..1bec644215 100644 --- a/django/db/migrations/graph.py +++ b/django/db/migrations/graph.py @@ -42,7 +42,7 @@ class Node: return str(self.key) def __repr__(self): - return '' % self.key + return '<%s: (%r, %r)>' % (self.__class__.__name__, self.key[0], self.key[1]) def add_child(self, child): self.children.add(child) @@ -81,9 +81,6 @@ class DummyNode(Node): self.origin = origin self.error_message = error_message - def __repr__(self): - return '' % self.key - def promote(self): """ Transition dummy to a normal node and clean off excess attribs. diff --git a/django/template/defaulttags.py b/django/template/defaulttags.py index 5f7efda912..cbea6a4394 100644 --- a/django/template/defaulttags.py +++ b/django/template/defaulttags.py @@ -278,7 +278,7 @@ class IfEqualNode(Node): self.negate = negate def __repr__(self): - return "" + return '<%s>' % self.__class__.__name__ def render(self, context): val1 = self.var1.resolve(context, True) @@ -294,7 +294,7 @@ class IfNode(Node): self.conditions_nodelists = conditions_nodelists def __repr__(self): - return "" + return '<%s>' % self.__class__.__name__ def __iter__(self): for _, nodelist in self.conditions_nodelists: @@ -518,7 +518,7 @@ class WithNode(Node): self.extra_context[name] = var def __repr__(self): - return "" + return '<%s>' % self.__class__.__name__ def render(self, context): values = {key: val.resolve(context) for key, val in self.extra_context.items()} diff --git a/django/template/loader_tags.py b/django/template/loader_tags.py index a0b0de54d0..de2338ad12 100644 --- a/django/template/loader_tags.py +++ b/django/template/loader_tags.py @@ -93,7 +93,7 @@ class ExtendsNode(Node): self.blocks = {n.name: n for n in nodelist.get_nodes_by_type(BlockNode)} def __repr__(self): - return '' % self.parent_name.token + return '<%s: extends %s>' % (self.__class__.__name__, self.parent_name.token) def find_template(self, template_name, context): """ diff --git a/django/templatetags/l10n.py b/django/templatetags/l10n.py index 64c8ae64dc..956b2e9019 100644 --- a/django/templatetags/l10n.py +++ b/django/templatetags/l10n.py @@ -29,7 +29,7 @@ class LocalizeNode(Node): self.use_l10n = use_l10n def __repr__(self): - return "" + return '<%s>' % self.__class__.__name__ def render(self, context): old_setting = context.use_l10n