mirror of
https://github.com/django/django.git
synced 2025-06-08 13:09:13 +00:00
feat: apply changes from review suggestions
Co-authored-by: Paolo Melchiorre <paolo@melchiorre.org> Co-authored-by: nessita <124304+nessita@users.noreply.github.com>
This commit is contained in:
parent
03c45aa696
commit
c7f0d1f0bc
@ -974,7 +974,7 @@ def phone2numeric_filter(value):
|
||||
|
||||
|
||||
@register.filter(is_safe=True)
|
||||
def pprint(v):
|
||||
def pprint(value):
|
||||
repr_instance = DjangoRepr()
|
||||
repr_instance.config(limit=EXCEPTION_PRINT_LIMIT)
|
||||
|
||||
|
@ -5,7 +5,7 @@ import reprlib
|
||||
class DjangoRepr(reprlib.Repr):
|
||||
|
||||
def config(self, limit):
|
||||
"""Sets maximum print length for all data structures using the given value"""
|
||||
"""Set maximum print length for all data structures to `limit`."""
|
||||
self.limit = limit
|
||||
for attr in dir(self):
|
||||
if attr.startswith("max") and attr != "maxlevel":
|
||||
|
Loading…
x
Reference in New Issue
Block a user