diff options
author | Claudiu Popa <pcmanticore@gmail.com> | 2015-09-05 15:24:35 +0300 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2015-09-05 15:24:35 +0300 |
commit | 4a1c791a46d90d8ef2d74cc8fbd291fc1b52deb6 (patch) | |
tree | bab95f38acdbb84c72be5a6f2076c8c3cb3b12e9 /pylint/lint.py | |
parent | db048da44f22ae5ce7eba93e0492a69842d2e856 (diff) | |
download | pylint-4a1c791a46d90d8ef2d74cc8fbd291fc1b52deb6.tar.gz |
Bring logilab-common's ureports into pylint.reporters.
With this change, we moved away from depending on logilab-common,
having in Pylint all the components that were used from logilab-common.
The API should be considered an implementation detail and can change at
some point in the future.
Closes issue #621.
Diffstat (limited to 'pylint/lint.py')
-rw-r--r-- | pylint/lint.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/pylint/lint.py b/pylint/lint.py index 16913f4..698f3e6 100644 --- a/pylint/lint.py +++ b/pylint/lint.py @@ -42,7 +42,6 @@ import warnings import astroid from astroid.__pkginfo__ import version as astroid_version from astroid import modutils -from logilab.common import ureports import six from pylint import checkers @@ -51,6 +50,7 @@ from pylint import reporters from pylint import utils from pylint import config from pylint.__pkginfo__ import version +from pylint.reporters.ureports import nodes as report_nodes MANAGER = astroid.MANAGER @@ -969,7 +969,7 @@ class PyLinter(config.OptionsManagerMixIn, filename = 'pylint_global.' + self.reporter.extension self.reporter.set_output(open(filename, 'w')) else: - sect = ureports.Section() + sect = report_nodes.Section() if self.config.reports or self.config.output_format == 'html': self.reporter.display_results(sect) # save results if persistent run @@ -980,7 +980,7 @@ class PyLinter(config.OptionsManagerMixIn, # No output will be emitted for the html # reporter if the file doesn't exist, so emit # the results here. - self.reporter.display_results(ureports.Section()) + self.reporter.display_results(report_nodes.Section()) self.reporter.on_close(self.stats, {}) # specific reports ######################################################## @@ -1003,7 +1003,7 @@ class PyLinter(config.OptionsManagerMixIn, pnote = previous_stats.get('global_note') if pnote is not None: msg += ' (previous run: %.2f/10, %+.2f)' % (pnote, note - pnote) - sect.append(ureports.Text(msg)) + sect.append(report_nodes.Text(msg)) # some reporting functions #################################################### @@ -1013,7 +1013,7 @@ def report_total_messages_stats(sect, stats, previous_stats): lines += checkers.table_lines_from_stats(stats, previous_stats, ('convention', 'refactor', 'warning', 'error')) - sect.append(ureports.Table(children=lines, cols=4, rheaders=1)) + sect.append(report_nodes.Table(children=lines, cols=4, rheaders=1)) def report_messages_stats(sect, stats, _): """make messages type report""" @@ -1027,7 +1027,7 @@ def report_messages_stats(sect, stats, _): lines = ('message id', 'occurrences') for value, msg_id in in_order: lines += (msg_id, str(value)) - sect.append(ureports.Table(children=lines, cols=2, rheaders=1)) + sect.append(report_nodes.Table(children=lines, cols=2, rheaders=1)) def report_messages_by_module_stats(sect, stats, _): """make errors / warnings by modules report""" @@ -1063,7 +1063,7 @@ def report_messages_by_module_stats(sect, stats, _): lines.append('%.2f' % val) if len(lines) == 5: raise utils.EmptyReport() - sect.append(ureports.Table(children=lines, cols=5, rheaders=1)) + sect.append(report_nodes.Table(children=lines, cols=5, rheaders=1)) # utilities ################################################################### |