summaryrefslogtreecommitdiff
path: root/pylint
diff options
context:
space:
mode:
authorClaudiu Popa <cpopa@cloudbasesolutions.com>2015-08-20 17:22:13 +0300
committerClaudiu Popa <cpopa@cloudbasesolutions.com>2015-08-20 17:22:13 +0300
commit8814e4ea53dbbf78667dfcd8d6e745cedee634ee (patch)
tree39e6fafb822b4680da134e8316631e7342b5bf2d /pylint
parent69f5e6975f7978527731622785cb9a9ce739ffb3 (diff)
downloadpylint-8814e4ea53dbbf78667dfcd8d6e745cedee634ee.tar.gz
--comment flag was obsoleted and it will be removed in Pylint 1.6.
Diffstat (limited to 'pylint')
-rw-r--r--pylint/config.py36
-rw-r--r--pylint/lint.py8
-rw-r--r--pylint/test/unittest_lint.py9
3 files changed, 1 insertions, 52 deletions
diff --git a/pylint/config.py b/pylint/config.py
index 213618e..a821726 100644
--- a/pylint/config.py
+++ b/pylint/config.py
@@ -121,39 +121,3 @@ directory).
Path to the configuration file. See the documentation for the method used
to search for configuration file.
''' % globals()
-
-# evaluation messages #########################################################
-
-def get_note_message(note):
- """return a message according to note
- note is a float < 10 (10 is the highest note)
- """
- assert note <= 10, "Note is %.2f. Either you cheated, or pylint's \
-broken!" % note
- if note < 0:
- msg = 'You have to do something quick !'
- elif note < 1:
- msg = 'Hey! This is really dreadful. Or maybe pylint is buggy?'
- elif note < 2:
- msg = "Come on! You can't be proud of this code"
- elif note < 3:
- msg = 'Hum... Needs work.'
- elif note < 4:
- msg = 'Wouldn\'t you be a bit lazy?'
- elif note < 5:
- msg = 'A little more work would make it acceptable.'
- elif note < 6:
- msg = 'Just the bare minimum. Give it a bit more polish. '
- elif note < 7:
- msg = 'This is okay-ish, but I\'m sure you can do better.'
- elif note < 8:
- msg = 'If you commit now, people should not be making nasty \
-comments about you on c.l.py'
- elif note < 9:
- msg = 'That\'s pretty good. Good work mate.'
- elif note < 10:
- msg = 'So close to being perfect...'
- else:
- msg = 'Wow ! Now this deserves our uttermost respect.\nPlease send \
-your code to python-projects@logilab.org'
- return msg
diff --git a/pylint/lint.py b/pylint/lint.py
index 9077296..5fd3d10 100644
--- a/pylint/lint.py
+++ b/pylint/lint.py
@@ -325,11 +325,7 @@ class PyLinter(configuration.OptionsManagerMixIn,
'statements analyzed. This is used by the global '
'evaluation report (RP0004).'}),
- ('comment',
- {'default': 0, 'type' : 'yn', 'metavar' : '<y_or_n>',
- 'group': 'Reports', 'level': 1,
- 'help' : 'Add a comment according to your evaluation note. '
- 'This is used by the global evaluation report (RP0004).'}),
+ ('comment', utils.deprecated_option(opt_type='yn')),
('confidence',
{'type' : 'multiple_choice', 'metavar': '<levels>',
@@ -1008,8 +1004,6 @@ class PyLinter(configuration.OptionsManagerMixIn,
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(ureports.Text(msg))
# some reporting functions ####################################################
diff --git a/pylint/test/unittest_lint.py b/pylint/test/unittest_lint.py
index 77b88ab..3095108 100644
--- a/pylint/test/unittest_lint.py
+++ b/pylint/test/unittest_lint.py
@@ -67,15 +67,6 @@ def remove(file):
except OSError:
pass
-class GetNoteMessageTC(unittest.TestCase):
- def test(self):
- msg = None
- for note in range(-1, 11):
- note_msg = config.get_note_message(note)
- self.assertNotEqual(msg, note_msg)
- msg = note_msg
-
-
HERE = abspath(dirname(__file__))
INPUTDIR = join(HERE, 'input')