Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(189)

Unified Diff: third_party/pylint/reporters/html.py

Issue 719313003: Revert "pylint: upgrade to 1.3.1" (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/pylint/reporters/guireporter.py ('k') | third_party/pylint/reporters/text.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/pylint/reporters/html.py
diff --git a/third_party/pylint/reporters/html.py b/third_party/pylint/reporters/html.py
index 71d46ebab02ce874da6081bc00888559e2e8eab6..56efcd6d1f93aea19173b5d64c376438a23aad5f 100644
--- a/third_party/pylint/reporters/html.py
+++ b/third_party/pylint/reporters/html.py
@@ -1,4 +1,5 @@
-# Copyright (c) 2003-2013 LOGILAB S.A. (Paris, FRANCE).
+# Copyright (c) 2003-2006 Sylvain Thenault (thenault@gmail.com).
+# Copyright (c) 2003-2011 LOGILAB S.A. (Paris, FRANCE).
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
@@ -10,7 +11,7 @@
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
"""HTML reporter"""
import sys
@@ -19,14 +20,13 @@ from cgi import escape
from logilab.common.ureports import HTMLWriter, Section, Table
from pylint.interfaces import IReporter
-from pylint.reporters import BaseReporter, Message
+from pylint.reporters import BaseReporter
class HTMLReporter(BaseReporter):
"""report messages and layouts in HTML"""
__implements__ = IReporter
- name = 'html'
extension = 'html'
def __init__(self, output=sys.stdout):
@@ -35,9 +35,12 @@ class HTMLReporter(BaseReporter):
def add_message(self, msg_id, location, msg):
"""manage message of different type and in the context of path"""
- msg = Message(self, msg_id, location, msg)
- self.msgs += (msg.category, msg.module, msg.obj,
- str(msg.line), str(msg.column), escape(msg.msg))
+ module, obj, line, col_offset = location[1:]
+ if self.include_ids:
+ sigle = msg_id
+ else:
+ sigle = msg_id[0]
+ self.msgs += [sigle, module, obj, str(line), str(col_offset), escape(msg)]
def set_output(self, output=None):
"""set output stream
@@ -64,7 +67,3 @@ class HTMLReporter(BaseReporter):
self.msgs = []
HTMLWriter().format(layout, self.out)
-
-def register(linter):
- """Register the reporter classes with the linter."""
- linter.register_reporter(HTMLReporter)
« no previous file with comments | « third_party/pylint/reporters/guireporter.py ('k') | third_party/pylint/reporters/text.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698