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/python3.py | |
parent | 1ce9be884414be2cbaffc8b6d2ac83de86017f8c (diff) | |
download | pylint-git-df1abe8d275970dbaefd2ccc4c22ad1c83eb381c.tar.gz |
Rip some of the six imports from the codebase
Diffstat (limited to 'pylint/checkers/python3.py')
-rw-r--r-- | pylint/checkers/python3.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/pylint/checkers/python3.py b/pylint/checkers/python3.py index 8e0da4b88..9b36d68aa 100644 --- a/pylint/checkers/python3.py +++ b/pylint/checkers/python3.py @@ -21,14 +21,11 @@ """Check Python 2 code for Python 2/3 source-compatible issues.""" from __future__ import absolute_import, print_function +from collections import namedtuple import re import sys import tokenize -from collections import namedtuple - -import six - import astroid from astroid import bases @@ -644,7 +641,7 @@ class Python3Checker(checkers.BaseChecker): self.add_message('print-statement', node=node, always_warn=True) def _warn_if_deprecated(self, node, module, attributes, report_on_modules=True): - for message, module_map in six.iteritems(self._bad_python3_module_map): + for message, module_map in self._bad_python3_module_map.items(): if module in module_map and module not in self._modules_warned_about: if isinstance(module_map, frozenset): if report_on_modules: @@ -731,7 +728,7 @@ class Python3Checker(checkers.BaseChecker): @staticmethod def _is_constant_string_or_name(node): if isinstance(node, astroid.Const): - return isinstance(node.value, six.string_types) + return isinstance(node.value, str) return isinstance(node, astroid.Name) @staticmethod @@ -749,7 +746,7 @@ class Python3Checker(checkers.BaseChecker): if inferred_type is astroid.Uninferable: confidence = INFERENCE_FAILURE elif not (isinstance(inferred_type, astroid.Const) and - isinstance(inferred_type.value, six.string_types)): + isinstance(inferred_type.value, str)): return None return confidence |