From 5b9d4b628a6f75df956ec1f0ba74b9844ca33943 Mon Sep 17 00:00:00 2001 From: Claudiu Popa Date: Thu, 15 Oct 2015 19:18:05 +0300 Subject: [PATCH] Rewrite the operation with a ternary if in order to be clearer. --- pylint/reporters/ureports/html_writer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pylint/reporters/ureports/html_writer.py b/pylint/reporters/ureports/html_writer.py index af36161e1..29c1cd3a6 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'') else: - self.writeln(u'' % (i%2 and 'even' or 'odd')) + self.writeln(u'' % ('even' if i % 2 else u'odd')) for j, cell in enumerate(row): cell = cell or u' ' if (layout.rheaders and i == 0) or \