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

Unified Diff: third_party/pylint/checkers/misc.py

Issue 753543006: pylint: upgrade to 1.4.0 (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 6 years 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/checkers/logging.py ('k') | third_party/pylint/checkers/newstyle.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/pylint/checkers/misc.py
diff --git a/third_party/pylint/checkers/misc.py b/third_party/pylint/checkers/misc.py
index b27b86ae6c2d23bf54dcd838e54c87ee7a4a4357..d4adfd78e7fc190b5961e983fc821f7ed2494e12 100644
--- a/third_party/pylint/checkers/misc.py
+++ b/third_party/pylint/checkers/misc.py
@@ -21,6 +21,7 @@ import re
from pylint.interfaces import IRawChecker
from pylint.checkers import BaseChecker
+import six
MSGS = {
@@ -72,8 +73,8 @@ class EncodingChecker(BaseChecker):
def _check_encoding(self, lineno, line, file_encoding):
try:
- return unicode(line, file_encoding)
- except UnicodeDecodeError, ex:
+ return six.text_type(line, file_encoding)
+ except UnicodeDecodeError as ex:
self.add_message('invalid-encoded-data', line=lineno,
args=(file_encoding, ex.args[2]))
« no previous file with comments | « third_party/pylint/checkers/logging.py ('k') | third_party/pylint/checkers/newstyle.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698