summaryrefslogtreecommitdiff
path: root/pylint/lint.py
diff options
context:
space:
mode:
authorSimu Toni <simutoni@gmail.com>2015-03-28 18:50:48 +0200
committerSimu Toni <simutoni@gmail.com>2015-03-28 18:50:48 +0200
commitb9de9484b6344eac77d1ae2fb085bf3e08c62673 (patch)
treefc71d93349d8905fbb2d80730248b79c43933170 /pylint/lint.py
parentbc4d7d822238e2acf738cb9437ccae11034e5e91 (diff)
parent5d91e6b235ac4a5619293b00b6f285085e1ac882 (diff)
downloadpylint-b9de9484b6344eac77d1ae2fb085bf3e08c62673.tar.gz
Merge
Diffstat (limited to 'pylint/lint.py')
-rw-r--r--pylint/lint.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/pylint/lint.py b/pylint/lint.py
index aeef0fa..632eb74 100644
--- a/pylint/lint.py
+++ b/pylint/lint.py
@@ -29,7 +29,6 @@ from __future__ import print_function
import collections
import contextlib
-import itertools
import operator
import os
try:
@@ -97,7 +96,11 @@ def _get_python_path(filepath):
def _merge_stats(stats):
merged = {}
+ by_msg = collections.Counter()
for stat in stats:
+ message_stats = stat.pop('by_msg', {})
+ by_msg.update(message_stats)
+
for key, item in six.iteritems(stat):
if key not in merged:
merged[key] = item
@@ -106,6 +109,8 @@ def _merge_stats(stats):
merged[key].update(item)
else:
merged[key] = merged[key] + item
+
+ merged['by_msg'] = by_msg
return merged
@@ -827,7 +832,7 @@ class PyLinter(configuration.OptionsManagerMixIn,
all_stats.append(stats)
self.msg_status |= msg_status
- self.stats = _merge_stats(itertools.chain(all_stats, [self.stats]))
+ self.stats = _merge_stats(all_stats)
self.current_name = module
# Insert stats data to local checkers.