1
0
mirror of https://github.com/django/django.git synced 2025-10-31 01:25:32 +00:00

Fixed E221 pep8 warnings.

This commit is contained in:
Tim Graham
2013-10-22 09:31:43 -04:00
parent 0d0f4f020a
commit 1597503a01
30 changed files with 94 additions and 90 deletions

View File

@@ -194,10 +194,10 @@ def linenumbers(value, autoescape=None):
width = six.text_type(len(six.text_type(len(lines))))
if not autoescape or isinstance(value, SafeData):
for i, line in enumerate(lines):
lines[i] = ("%0" + width + "d. %s") % (i + 1, line)
lines[i] = ("%0" + width + "d. %s") % (i + 1, line)
else:
for i, line in enumerate(lines):
lines[i] = ("%0" + width + "d. %s") % (i + 1, escape(line))
lines[i] = ("%0" + width + "d. %s") % (i + 1, escape(line))
return mark_safe('\n'.join(lines))
@register.filter(is_safe=True)