summaryrefslogtreecommitdiff
path: root/checkers/logging.py
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2014-08-29 14:24:30 -0400
committerBrett Cannon <brett@python.org>2014-08-29 14:24:30 -0400
commit91dfa1ca00a40fd6063bd4736f3e1de5843adfa6 (patch)
treeb04d0479619a33421a1f8d55f8d8a4ea394c6bdd /checkers/logging.py
parent29445fb9c72847be677b819475bfb7a3a950cbee (diff)
downloadpylint-git-91dfa1ca00a40fd6063bd4736f3e1de5843adfa6.tar.gz
Change basestring to six.string_types
--HG-- branch : python_6
Diffstat (limited to 'checkers/logging.py')
-rw-r--r--checkers/logging.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/checkers/logging.py b/checkers/logging.py
index a5b38d884..39c4d9cee 100644
--- a/checkers/logging.py
+++ b/checkers/logging.py
@@ -20,6 +20,9 @@ from pylint import interfaces
from pylint.checkers import utils
from pylint.checkers.utils import check_messages
+import six
+
+
MSGS = {
'W1201': ('Specify string format arguments as logging function parameters',
'logging-not-lazy',
@@ -166,7 +169,7 @@ class LoggingChecker(checkers.BaseChecker):
# don't check any further.
return
format_string = node.args[format_arg].value
- if not isinstance(format_string, basestring):
+ if not isinstance(format_string, six.string_types):
# If the log format is constant non-string (e.g. logging.debug(5)),
# ensure there are no arguments.
required_num_args = 0