Rename "I" to "line_prefix" to avoid flake8 E741

Signed-off-by: Niels Thykier <niels@thykier.net>
This commit is contained in:
Niels Thykier 2018-02-17 09:10:55 +00:00 committed by Eduard Braun
parent b20a0698cc
commit f3d8936b5e

View file

@ -3205,17 +3205,17 @@ def serializeXML(element, options, ind=0, preserveWhitespace=False):
outParts = [] outParts = []
indent = ind indent = ind
I = '' line_prefix = ''
newline = '' newline = ''
if options.newlines: if options.newlines:
if options.indent_type == 'tab': if options.indent_type == 'tab':
I = '\t' line_prefix = '\t'
elif options.indent_type == 'space': elif options.indent_type == 'space':
I = ' ' line_prefix = ' '
I *= options.indent_depth line_prefix *= options.indent_depth
newline = '\n' newline = '\n'
outParts.extend([(I * ind), '<', element.nodeName]) outParts.extend([(line_prefix * ind), '<', element.nodeName])
# now serialize the other attributes # now serialize the other attributes
known_attr = [ known_attr = [
@ -3303,7 +3303,7 @@ def serializeXML(element, options, ind=0, preserveWhitespace=False):
pass pass
if onNewLine: if onNewLine:
outParts.append(I * ind) outParts.append(line_prefix * ind)
outParts.extend(['</', element.nodeName, '>']) outParts.extend(['</', element.nodeName, '>'])
if indent > 0: if indent > 0:
outParts.append(newline) outParts.append(newline)