diff options
author | Claudiu Popa <pcmanticore@gmail.com> | 2015-11-21 19:42:08 +0200 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2015-11-21 19:42:08 +0200 |
commit | e648e23980d361c8504d41d6b94f9659199ce060 (patch) | |
tree | 128e27f0d35d60ed78c3f291ec30abf4a67f982e /pylint/reporters | |
parent | 770dd9e70b7235e6268fb4581f1db23ab18c6cd7 (diff) | |
download | pylint-e648e23980d361c8504d41d6b94f9659199ce060.tar.gz |
Cleanup pylint issues
This changeset also brings a couple of changes:
* rrheaders and rcheaders are dropped from html_writer.Table's constructor.
They weren't used at all and it was dead code. This simplified some
if statements.
* _is_attribute_property is used to look for a property assignment
instead on relying on a different implementation.
Diffstat (limited to 'pylint/reporters')
-rw-r--r-- | pylint/reporters/ureports/html_writer.py | 6 | ||||
-rw-r--r-- | pylint/reporters/ureports/nodes.py | 4 |
2 files changed, 2 insertions, 8 deletions
diff --git a/pylint/reporters/ureports/html_writer.py b/pylint/reporters/ureports/html_writer.py index c5f74d3..b3db270 100644 --- a/pylint/reporters/ureports/html_writer.py +++ b/pylint/reporters/ureports/html_writer.py @@ -61,16 +61,12 @@ class HTMLWriter(BaseWriter): for i, row in enumerate(table_content): if i == 0 and layout.rheaders: self.writeln(u'<tr class="header">') - elif i+1 == len(table_content) and layout.rrheaders: - self.writeln(u'<tr class="header">') else: self.writeln(u'<tr class="%s">' % (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 \ - (layout.cheaders and j == 0) or \ - (layout.rrheaders and i+1 == len(table_content)) or \ - (layout.rcheaders and j+1 == len(row)): + (layout.cheaders and j == 0): self.writeln(u'<th>%s</th>' % cell) else: self.writeln(u'<td>%s</td>' % cell) diff --git a/pylint/reporters/ureports/nodes.py b/pylint/reporters/ureports/nodes.py index 104ba83..9bd9c10 100644 --- a/pylint/reporters/ureports/nodes.py +++ b/pylint/reporters/ureports/nodes.py @@ -171,7 +171,7 @@ class Table(BaseLayout): * title : the table's optional title """ def __init__(self, cols, title=None, - rheaders=0, cheaders=0, rrheaders=0, rcheaders=0, + rheaders=0, cheaders=0, **kwargs): super(Table, self).__init__(**kwargs) assert isinstance(cols, int) @@ -179,5 +179,3 @@ class Table(BaseLayout): self.title = title self.rheaders = rheaders self.cheaders = cheaders - self.rrheaders = rrheaders - self.rcheaders = rcheaders |