diff options
Diffstat (limited to 'pylint/checkers/misc.py')
-rw-r--r-- | pylint/checkers/misc.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/pylint/checkers/misc.py b/pylint/checkers/misc.py index 2e460649f..9b75fd43b 100644 --- a/pylint/checkers/misc.py +++ b/pylint/checkers/misc.py @@ -34,11 +34,10 @@ from pylint.utils.pragma_parser import OPTION_PO, PragmaParserError, parse_pragm class ByIdManagedMessagesChecker(BaseChecker): - """checks for messages that are enabled or disabled by id instead of symbol.""" + """Checks for messages that are enabled or disabled by id instead of symbol.""" __implements__ = IRawChecker - # configuration section name name = "miscellaneous" msgs = { "I0023": ( @@ -51,12 +50,12 @@ class ByIdManagedMessagesChecker(BaseChecker): options = () def process_module(self, module): - """inspect the source file to find messages activated or deactivated by id.""" + """Inspect the source file to find messages activated or deactivated by id.""" managed_msgs = MessagesHandlerMixIn.get_by_id_managed_msgs() - for (mod_name, msg_id, msg_symbol, lineno, is_disabled) in managed_msgs: + for (mod_name, msgid, symbol, lineno, is_disabled) in managed_msgs: if mod_name == module.name: verb = "disable" if is_disabled else "enable" - txt = f"Id '{msg_id}' is used to {verb} '{msg_symbol}' message emission" + txt = f"'{msgid}' is cryptic: use '# pylint: {verb}={symbol}' instead" self.add_message("use-symbolic-message-instead", line=lineno, args=txt) MessagesHandlerMixIn.clear_by_id_managed_msgs() |