mirror of
https://github.com/django/django.git
synced 2025-12-18 23:03:16 +00:00
Fixed #21270 -- Fixed E701 pep8 warnings
This commit is contained in:
parent
650b6fd90e
commit
eb214452c3
78 changed files with 625 additions and 285 deletions
|
|
@ -48,7 +48,8 @@ class ErrorDict(dict):
|
|||
return self.as_ul()
|
||||
|
||||
def as_ul(self):
|
||||
if not self: return ''
|
||||
if not self:
|
||||
return ''
|
||||
return format_html('<ul class="errorlist">{0}</ul>',
|
||||
format_html_join('', '<li>{0}{1}</li>',
|
||||
((k, force_text(v))
|
||||
|
|
@ -67,7 +68,8 @@ class ErrorList(list):
|
|||
return self.as_ul()
|
||||
|
||||
def as_ul(self):
|
||||
if not self: return ''
|
||||
if not self:
|
||||
return ''
|
||||
return format_html('<ul class="errorlist">{0}</ul>',
|
||||
format_html_join('', '<li>{0}</li>',
|
||||
((force_text(e),) for e in self)
|
||||
|
|
@ -75,7 +77,8 @@ class ErrorList(list):
|
|||
)
|
||||
|
||||
def as_text(self):
|
||||
if not self: return ''
|
||||
if not self:
|
||||
return ''
|
||||
return '\n'.join('* %s' % force_text(e) for e in self)
|
||||
|
||||
def __repr__(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue