summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudiu Popa <pcmanticore@gmail.com>2018-08-24 09:43:08 +0200
committerClaudiu Popa <pcmanticore@gmail.com>2018-08-24 09:43:08 +0200
commita284b6bedfff084f6fbeacae9e5dd702568abb75 (patch)
treead427a10b5e34e78bebb1ac4e995e9fef7927df6
parent33f8ac7394eb6582c9e92b1b4221fc8db27d243b (diff)
downloadpylint-git-a284b6bedfff084f6fbeacae9e5dd702568abb75.tar.gz
The ``locally-enabled`` check is gone.
Close #2442
-rw-r--r--ChangeLog4
-rw-r--r--examples/pylintrc1
-rw-r--r--pylint/lint.py4
-rw-r--r--pylint/utils.py5
4 files changed, 5 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 3973bffef..425945bde 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,10 @@ What's New in Pylint 2.2?
Release date: TBA
+ * The ``locally-enabled`` check is gone.
+
+ Close #2442
+
* Infer decorated methods when looking for method-hidden
Close #2369
diff --git a/examples/pylintrc b/examples/pylintrc
index 9fa691b3e..ad2faec6c 100644
--- a/examples/pylintrc
+++ b/examples/pylintrc
@@ -68,7 +68,6 @@ disable=print-statement,
raw-checker-failed,
bad-inline-option,
locally-disabled,
- locally-enabled,
file-ignored,
suppressed-message,
useless-suppression,
diff --git a/pylint/lint.py b/pylint/lint.py
index 3b9345460..258f0ed91 100644
--- a/pylint/lint.py
+++ b/pylint/lint.py
@@ -188,10 +188,6 @@ MSGS = {
'locally-disabled',
'Used when an inline option disables a message or a messages '
'category.'),
- 'I0012': ('Locally enabling %s (%s)',
- 'locally-enabled',
- 'Used when an inline option enables a message or a messages '
- 'category.'),
'I0013': ('Ignoring entire file',
'file-ignored',
'Used to inform that the file will not be checked'),
diff --git a/pylint/utils.py b/pylint/utils.py
index 323d089fb..49216b675 100644
--- a/pylint/utils.py
+++ b/pylint/utils.py
@@ -334,10 +334,7 @@ class MessagesHandlerMixIn:
if scope == 'module':
self.file_state.set_msg_status(msg, line, enable)
- if enable:
- self.add_message('locally-enabled', line=line,
- args=(msg.symbol, msg.msgid))
- elif msg.symbol != 'locally-disabled':
+ if not enable and msg.symbol != 'locally-disabled':
self.add_message('locally-disabled', line=line,
args=(msg.symbol, msg.msgid))
else: