1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Refs #27546 -- Removed hardcoded class names in __repr__() methods.

This commit is contained in:
Mads Jensen
2017-02-04 10:11:26 +01:00
committed by Tim Graham
parent ce69a421f6
commit 86ae1d51ed
4 changed files with 6 additions and 9 deletions

View File

@@ -42,7 +42,7 @@ class Node:
return str(self.key)
def __repr__(self):
return '<Node: (%r, %r)>' % 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 '<DummyNode: (%r, %r)>' % self.key
def promote(self):
"""
Transition dummy to a normal node and clean off excess attribs.