summaryrefslogtreecommitdiff
path: root/utils.py
diff options
context:
space:
mode:
authorSylvain Th?nault <sylvain.thenault@logilab.fr>2014-11-19 09:50:28 +0100
committerSylvain Th?nault <sylvain.thenault@logilab.fr>2014-11-19 09:50:28 +0100
commit51af5e9c258e66445366309c89c55d6db464af53 (patch)
treef3a684773bfd24426ab903137a341dbf03a3f4a3 /utils.py
parent9904ce2f5f81cc4b4175d8cd322ee376c91b2f18 (diff)
downloadpylint-51af5e9c258e66445366309c89c55d6db464af53.tar.gz
pylint pylint
Diffstat (limited to 'utils.py')
-rw-r--r--utils.py19
1 files changed, 10 insertions, 9 deletions
diff --git a/utils.py b/utils.py
index 0f7f448..fcc7904 100644
--- a/utils.py
+++ b/utils.py
@@ -24,9 +24,11 @@ import re
import sys
import tokenize
import warnings
-
from os.path import dirname, basename, splitext, exists, isdir, join, normpath
+import six
+from six.moves import zip # pylint: disable=redefined-builtin
+
from logilab.common.interface import implements
from logilab.common.textutils import normalize_text
from logilab.common.configuration import rest_format_section
@@ -37,8 +39,6 @@ from astroid.modutils import modpath_from_file, get_module_files, \
file_from_modpath, load_module_from_file
from pylint.interfaces import IRawChecker, ITokenChecker, UNDEFINED
-import six
-from six.moves import zip
class UnknownMessage(Exception):
@@ -121,11 +121,11 @@ def get_module_and_frameid(node):
obj.reverse()
return module, '.'.join(obj)
-def category_id(id):
- id = id.upper()
- if id in MSG_TYPES:
- return id
- return MSG_TYPES_LONG.get(id)
+def category_id(cid):
+ cid = cid.upper()
+ if cid in MSG_TYPES:
+ return cid
+ return MSG_TYPES_LONG.get(cid)
def tokenize_module(module):
@@ -557,7 +557,8 @@ class FileState(object):
except KeyError:
self._module_msgs_state[msg.msgid] = {line: status}
- def handle_ignored_message(self, state_scope, msgid, line, node, args, confidence):
+ def handle_ignored_message(self, state_scope, msgid, line,
+ node, args, confidence): # pylint: disable=unused-argument
"""Report an ignored message.
state_scope is either MSG_STATE_SCOPE_MODULE or MSG_STATE_SCOPE_CONFIG,