summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudiu Popa <pcmanticore@gmail.com>2015-10-15 19:18:05 +0300
committerClaudiu Popa <pcmanticore@gmail.com>2015-10-15 19:18:05 +0300
commitda473ffea7d97390bae2aa3e4edc33e769922fec (patch)
treeffbecc2d8e8e0d7203d1794a34f23e7edf64d31f
parenteabf787fd7412e05d6c3ec8410e044f4a72e9323 (diff)
downloadpylint-da473ffea7d97390bae2aa3e4edc33e769922fec.tar.gz
Rewrite the operation with a ternary if in order to be clearer.
-rw-r--r--pylint/reporters/ureports/html_writer.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pylint/reporters/ureports/html_writer.py b/pylint/reporters/ureports/html_writer.py
index af36161..29c1cd3 100644
--- a/pylint/reporters/ureports/html_writer.py
+++ b/pylint/reporters/ureports/html_writer.py
@@ -76,7 +76,7 @@ class HTMLWriter(BaseWriter):
elif i+1 == len(table_content) and layout.rrheaders:
self.writeln(u'<tr class="header">')
else:
- self.writeln(u'<tr class="%s">' % (i%2 and 'even' or 'odd'))
+ self.writeln(u'<tr class="%s">' % ('even' if i % 2 else u'odd'))
for j, cell in enumerate(row):
cell = cell or u'&#160;'
if (layout.rheaders and i == 0) or \