mirror of
https://github.com/django/django.git
synced 2024-12-22 17:16:24 +00:00
chore: fix debug tests
This commit is contained in:
parent
65045060ac
commit
d68430349e
@ -520,9 +520,12 @@ class DebugRepr(reprlib.Repr):
|
||||
return s
|
||||
|
||||
def print(self, value):
|
||||
if isinstance(value, Sized) and len(value) > self.limit:
|
||||
if isinstance(value, Sized):
|
||||
length = len(value)
|
||||
self.fillvalue = self.gen_trim_msg(length)
|
||||
if length > self.limit:
|
||||
self.fillvalue = self.gen_trim_msg(length)
|
||||
else:
|
||||
self.fillvalue = ""
|
||||
else:
|
||||
self.fillvalue = "..."
|
||||
return self.repr(value)
|
||||
|
Loading…
Reference in New Issue
Block a user