summaryrefslogtreecommitdiff
path: root/lint.py
diff options
context:
space:
mode:
authorSylvain Th?nault <sylvain.thenault@logilab.fr>2013-05-07 10:03:06 +0200
committerSylvain Th?nault <sylvain.thenault@logilab.fr>2013-05-07 10:03:06 +0200
commit762931ab2262fc73a5272d656e39409c5db86e8e (patch)
tree9d16f0fae57420f6f1f80cf795efc17af5704e24 /lint.py
parent0c33289faebe3c31c7a072329390c2dda7977722 (diff)
downloadpylint-762931ab2262fc73a5272d656e39409c5db86e8e.tar.gz
add delta to comparison with note from previous execution
as suggested by S?bastien Celles
Diffstat (limited to 'lint.py')
-rw-r--r--lint.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/lint.py b/lint.py
index 98f7c70..335de16 100644
--- a/lint.py
+++ b/lint.py
@@ -737,8 +737,9 @@ This is used by the global evaluation report (RP0004).'}),
else:
stats['global_note'] = note
msg = 'Your code has been rated at %.2f/10' % note
- if 'global_note' in previous_stats:
- msg += ' (previous run: %.2f/10)' % previous_stats['global_note']
+ pnote = previous_stats.get('global_note')
+ if pnote is not None:
+ msg += ' (previous run: %.2f/10, %+.2f)' % (pnote, note - pnote)
if self.config.comment:
msg = '%s\n%s' % (msg, config.get_note_message(note))
sect.append(Text(msg))