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

Fixed all E226 violations

This commit is contained in:
Alex Gaynor
2013-11-03 10:08:55 -08:00
parent 7288e1b02b
commit c347f78cc1
51 changed files with 150 additions and 150 deletions

View File

@@ -680,14 +680,14 @@ def unordered_list(value, autoescape=None):
sublist_item = title
title = ''
elif i < list_length - 1:
next_item = list_[i+1]
next_item = list_[i + 1]
if next_item and isinstance(next_item, (list, tuple)):
# The next item is a sub-list.
sublist_item = next_item
# We've processed the next item now too.
i += 1
if sublist_item:
sublist = _helper(sublist_item, tabs+1)
sublist = _helper(sublist_item, tabs + 1)
sublist = '\n%s<ul>\n%s\n%s</ul>\n%s' % (indent, sublist,
indent, indent)
output.append('%s<li>%s%s</li>' % (indent,

View File

@@ -171,7 +171,7 @@ class ForNode(Node):
for i, item in enumerate(values):
# Shortcuts for current loop iteration number.
loop_dict['counter0'] = i
loop_dict['counter'] = i+1
loop_dict['counter'] = i + 1
# Reverse counter iteration numbers.
loop_dict['revcounter'] = len_values - i
loop_dict['revcounter0'] = len_values - i - 1
@@ -832,7 +832,7 @@ def do_for(parser, token):
raise TemplateSyntaxError("'for' tag received an invalid argument:"
" %s" % token.contents)
sequence = parser.compile_filter(bits[in_index+1])
sequence = parser.compile_filter(bits[in_index + 1])
nodelist_loop = parser.parse(('empty', 'endfor',))
token = parser.next_token()
if token.contents == 'empty':

View File

@@ -158,7 +158,7 @@ class IfParser(object):
i = 0
while i < l:
token = tokens[i]
if token == "not" and i + 1 < l and tokens[i+1] == "in":
if token == "not" and i + 1 < l and tokens[i + 1] == "in":
token = "not in"
i += 1 # skip 'in'
mapped_tokens.append(self.translate_token(token))