summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudiu Popa <pcmanticore@gmail.com>2015-10-15 19:15:41 +0300
committerClaudiu Popa <pcmanticore@gmail.com>2015-10-15 19:15:41 +0300
commiteabf787fd7412e05d6c3ec8410e044f4a72e9323 (patch)
tree7418529bcf2d39402726e3c90c0bd8aa6a7f9931
parent4e82b39a1e0e2329de4df11cd79740a5455b7b5d (diff)
downloadpylint-eabf787fd7412e05d6c3ec8410e044f4a72e9323.tar.gz
Remove unused nodes and corresponding visit methods.
-rw-r--r--pylint/reporters/ureports/html_writer.py18
-rw-r--r--pylint/reporters/ureports/nodes.py24
-rw-r--r--pylint/reporters/ureports/text_writer.py22
3 files changed, 0 insertions, 64 deletions
diff --git a/pylint/reporters/ureports/html_writer.py b/pylint/reporters/ureports/html_writer.py
index 005ac62..af36161 100644
--- a/pylint/reporters/ureports/html_writer.py
+++ b/pylint/reporters/ureports/html_writer.py
@@ -89,30 +89,12 @@ class HTMLWriter(BaseWriter):
self.writeln(u'</tr>')
self.writeln(u'</table>')
- def visit_list(self, layout):
- """display a list as html"""
- self.writeln(u'<ul%s>' % self.handle_attrs(layout))
- for row in list(self.compute_content(layout)):
- self.writeln(u'<li>%s</li>' % row)
- self.writeln(u'</ul>')
-
def visit_paragraph(self, layout):
"""display links (using <p>)"""
self.write(u'<p>')
self.format_children(layout)
self.write(u'</p>')
- def visit_span(self, layout):
- """display links (using <p>)"""
- self.write(u'<span%s>' % self.handle_attrs(layout))
- self.format_children(layout)
- self.write(u'</span>')
-
- def visit_link(self, layout):
- """display links (using <a>)"""
- self.write(u' <a href="%s"%s>%s</a>' % (layout.url,
- self.handle_attrs(layout),
- layout.label))
def visit_verbatimtext(self, layout):
"""display verbatim text (using <pre>)"""
self.write(u'<pre>')
diff --git a/pylint/reporters/ureports/nodes.py b/pylint/reporters/ureports/nodes.py
index 01cbcb7..7a0dba4 100644
--- a/pylint/reporters/ureports/nodes.py
+++ b/pylint/reporters/ureports/nodes.py
@@ -95,22 +95,6 @@ class VerbatimText(Text):
* data : the text value as an encoded or unicode string
"""
-
-class Link(BaseComponent):
- """a labelled link
-
- attributes :
- * BaseComponent attributes
- * url : the link's target (REQUIRED)
- * label : the link's label as a string (use the url by default)
- """
- def __init__(self, url, label=None, **kwargs):
- super(Link, self).__init__(**kwargs)
- assert url
- self.url = url
- self.label = label or url
-
-
# container nodes #############################################################
class Section(BaseLayout):
@@ -173,11 +157,3 @@ class Table(BaseLayout):
self.cheaders = cheaders
self.rrheaders = rrheaders
self.rcheaders = rcheaders
-
-
-class List(BaseLayout):
- """some list data
-
- attributes :
- * BaseLayout attributes
- """
diff --git a/pylint/reporters/ureports/text_writer.py b/pylint/reporters/ureports/text_writer.py
index 545f999..9d91349 100644
--- a/pylint/reporters/ureports/text_writer.py
+++ b/pylint/reporters/ureports/text_writer.py
@@ -65,10 +65,6 @@ class TextWriter(BaseWriter):
self.format_children(layout)
self.writeln()
- def visit_span(self, layout):
- """enter a span"""
- self.format_children(layout)
-
def visit_table(self, layout):
"""display a table as text"""
table_content = self.get_table_content(layout)
@@ -112,24 +108,6 @@ class TextWriter(BaseWriter):
for field, value in table_content:
self.write(format_string % (field, value))
- def visit_list(self, layout):
- """display a list layout as text"""
- bullet = BULLETS[self.list_level % len(BULLETS)]
- indent = ' ' * self.list_level
- self.list_level += 1
- for child in layout.children:
- self.write(u'%s%s%s ' % (os.linesep, indent, bullet))
- child.accept(self)
- self.list_level -= 1
-
- def visit_link(self, layout):
- """add a hyperlink"""
- if layout.label != layout.url:
- self.write(u'`%s`_' % layout.label)
- self.pending_urls.append((layout.label, layout.url))
- else:
- self.write(layout.url)
-
def visit_verbatimtext(self, layout):
"""display a verbatim layout as text (so difficult ;)
"""