diff options
Diffstat (limited to 'checkers/logging.py')
-rw-r--r-- | checkers/logging.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/checkers/logging.py b/checkers/logging.py index a5b38d8..39c4d9c 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 |