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/refactoring.py | |
parent | 1ce9be884414be2cbaffc8b6d2ac83de86017f8c (diff) | |
download | pylint-git-df1abe8d275970dbaefd2ccc4c22ad1c83eb381c.tar.gz |
Rip some of the six imports from the codebase
Diffstat (limited to 'pylint/checkers/refactoring.py')
-rw-r--r-- | pylint/checkers/refactoring.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/pylint/checkers/refactoring.py b/pylint/checkers/refactoring.py index 3ad179da2..1a3641ebb 100644 --- a/pylint/checkers/refactoring.py +++ b/pylint/checkers/refactoring.py @@ -15,14 +15,13 @@ # For details: https://github.com/PyCQA/pylint/blob/master/COPYING """Looks for code which can be refactored.""" - +import builtins import collections import itertools import tokenize import astroid from astroid import decorators -import six from pylint import interfaces from pylint import checkers @@ -253,7 +252,7 @@ class RefactoringChecker(checkers.BaseTokenChecker): # tokens[index][2] is the actual position and also is # reported by IronPython. self._elifs.extend([tokens[index][2], tokens[index+1][2]]) - elif six.PY3 and is_trailing_comma(tokens, index): + elif is_trailing_comma(tokens, index): if self.linter.is_message_enabled('trailing-comma-tuple'): self.add_message('trailing-comma-tuple', line=token.start[0]) @@ -728,7 +727,7 @@ class NotChecker(checkers.BaseChecker): # not equivalent to "set(LEFT_VALS) > set(RIGHT_VALS)" skipped_nodes = (astroid.Set,) # 'builtins' py3, '__builtin__' py2 - skipped_classnames = ['%s.%s' % (six.moves.builtins.__name__, qname) + skipped_classnames = ['%s.%s' % (builtins.__name__, qname) for qname in ('set', 'frozenset')] @utils.check_messages('unneeded-not') |