diff options
author | Brett Cannon <brett@python.org> | 2014-08-29 15:48:24 -0400 |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2014-08-29 15:48:24 -0400 |
commit | 8e23aa2b179274c9c1b128a8b3daf8d2e24cfd75 (patch) | |
tree | c234e08aa390be9bca941e66e508071e5e44a801 /reporters/text.py | |
parent | 001469c8272a235b4f62b9b5c3ee248635168ad4 (diff) | |
parent | c2cc31874880d7f0d5bd444c6a3b17fa817e2509 (diff) | |
download | pylint-python_6.tar.gz |
Merge with defaultpython_6
Diffstat (limited to 'reporters/text.py')
-rw-r--r-- | reporters/text.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/reporters/text.py b/reporters/text.py index 48b5155..acb22b5 100644 --- a/reporters/text.py +++ b/reporters/text.py @@ -16,6 +16,7 @@ :text: the default one grouping messages by module :colorized: an ANSI colorized text reporter """ +from __future__ import print_function import warnings @@ -24,6 +25,7 @@ from logilab.common.textutils import colorize_ansi from pylint.interfaces import IReporter from pylint.reporters import BaseReporter +import six TITLE_UNDERLINES = ['', '=', '-', '.'] @@ -42,7 +44,7 @@ class TextReporter(BaseReporter): self._template = None def on_set_current_module(self, module, filepath): - self._template = unicode(self.linter.config.msg_template or self.line_format) + self._template = six.text_type(self.linter.config.msg_template or self.line_format) def write_message(self, msg): """Convenience method to write a formated message with class default template""" @@ -60,7 +62,7 @@ class TextReporter(BaseReporter): def _display(self, layout): """launch layouts display""" - print >> self.out + print(file=self.out) TextWriter().format(layout, self.out) |