diff options
author | Claudiu Popa <pcmanticore@gmail.com> | 2018-01-25 16:13:59 +0100 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2018-01-25 16:13:59 +0100 |
commit | df1abe8d275970dbaefd2ccc4c22ad1c83eb381c (patch) | |
tree | f2438ad494f63824ddbb1859d4c34b77e61446b4 /pylint/checkers/logging.py | |
parent | 1ce9be884414be2cbaffc8b6d2ac83de86017f8c (diff) | |
download | pylint-git-df1abe8d275970dbaefd2ccc4c22ad1c83eb381c.tar.gz |
Rip some of the six imports from the codebase
Diffstat (limited to 'pylint/checkers/logging.py')
-rw-r--r-- | pylint/checkers/logging.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/pylint/checkers/logging.py b/pylint/checkers/logging.py index 051fa7589..4cc3c30f8 100644 --- a/pylint/checkers/logging.py +++ b/pylint/checkers/logging.py @@ -17,8 +17,6 @@ """ import string -import six - import astroid from pylint import checkers @@ -226,7 +224,7 @@ class LoggingChecker(checkers.BaseChecker): # don't check any further. return format_string = node.args[format_arg].value - if not isinstance(format_string, six.string_types): + if not isinstance(format_string, str): # If the log format is constant non-string (e.g. logging.debug(5)), # ensure there are no arguments. required_num_args = 0 @@ -261,7 +259,7 @@ def is_complex_format_str(node): bool: True if inferred string uses complex formatting, False otherwise """ inferred = utils.safe_infer(node) - if inferred is None or not isinstance(inferred.value, six.string_types): + if inferred is None or not isinstance(inferred.value, str): return True for _, _, format_spec, _ in string.Formatter().parse(inferred.value): if format_spec: |