summaryrefslogtreecommitdiff
path: root/Lib/lib2to3/fixes
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/lib2to3/fixes')
-rw-r--r--Lib/lib2to3/fixes/fix_dict.py3
-rw-r--r--Lib/lib2to3/fixes/fix_exec.py1
-rw-r--r--Lib/lib2to3/fixes/fix_filter.py1
-rw-r--r--Lib/lib2to3/fixes/fix_has_key.py1
-rw-r--r--Lib/lib2to3/fixes/fix_metaclass.py2
-rw-r--r--Lib/lib2to3/fixes/fix_nonzero.py2
-rw-r--r--Lib/lib2to3/fixes/fix_print.py2
-rw-r--r--Lib/lib2to3/fixes/fix_types.py3
-rw-r--r--Lib/lib2to3/fixes/fix_urllib.py1
9 files changed, 5 insertions, 11 deletions
diff --git a/Lib/lib2to3/fixes/fix_dict.py b/Lib/lib2to3/fixes/fix_dict.py
index 963f952e0b..d3655c9f1b 100644
--- a/Lib/lib2to3/fixes/fix_dict.py
+++ b/Lib/lib2to3/fixes/fix_dict.py
@@ -30,9 +30,8 @@ as an argument to a function that introspects the argument).
# Local imports
from .. import pytree
from .. import patcomp
-from ..pgen2 import token
from .. import fixer_base
-from ..fixer_util import Name, Call, LParen, RParen, ArgList, Dot
+from ..fixer_util import Name, Call, Dot
from .. import fixer_util
diff --git a/Lib/lib2to3/fixes/fix_exec.py b/Lib/lib2to3/fixes/fix_exec.py
index 2c9b72d542..ab921ee80c 100644
--- a/Lib/lib2to3/fixes/fix_exec.py
+++ b/Lib/lib2to3/fixes/fix_exec.py
@@ -10,7 +10,6 @@ exec code in ns1, ns2 -> exec(code, ns1, ns2)
"""
# Local imports
-from .. import pytree
from .. import fixer_base
from ..fixer_util import Comma, Name, Call
diff --git a/Lib/lib2to3/fixes/fix_filter.py b/Lib/lib2to3/fixes/fix_filter.py
index 391889f913..bb6718cbf7 100644
--- a/Lib/lib2to3/fixes/fix_filter.py
+++ b/Lib/lib2to3/fixes/fix_filter.py
@@ -14,7 +14,6 @@ Python 2.6 figure it out.
"""
# Local imports
-from ..pgen2 import token
from .. import fixer_base
from ..fixer_util import Name, Call, ListComp, in_special_context
diff --git a/Lib/lib2to3/fixes/fix_has_key.py b/Lib/lib2to3/fixes/fix_has_key.py
index 18c560fd85..439708c992 100644
--- a/Lib/lib2to3/fixes/fix_has_key.py
+++ b/Lib/lib2to3/fixes/fix_has_key.py
@@ -31,7 +31,6 @@ CAVEATS:
# Local imports
from .. import pytree
-from ..pgen2 import token
from .. import fixer_base
from ..fixer_util import Name, parenthesize
diff --git a/Lib/lib2to3/fixes/fix_metaclass.py b/Lib/lib2to3/fixes/fix_metaclass.py
index 46c7aaf1e3..8e34463bd8 100644
--- a/Lib/lib2to3/fixes/fix_metaclass.py
+++ b/Lib/lib2to3/fixes/fix_metaclass.py
@@ -20,7 +20,7 @@
# Local imports
from .. import fixer_base
from ..pygram import token
-from ..fixer_util import Name, syms, Node, Leaf
+from ..fixer_util import syms, Node, Leaf
def has_metaclass(parent):
diff --git a/Lib/lib2to3/fixes/fix_nonzero.py b/Lib/lib2to3/fixes/fix_nonzero.py
index ad91a29e43..c2295969a7 100644
--- a/Lib/lib2to3/fixes/fix_nonzero.py
+++ b/Lib/lib2to3/fixes/fix_nonzero.py
@@ -3,7 +3,7 @@
# Local imports
from .. import fixer_base
-from ..fixer_util import Name, syms
+from ..fixer_util import Name
class FixNonzero(fixer_base.BaseFix):
BM_compatible = True
diff --git a/Lib/lib2to3/fixes/fix_print.py b/Lib/lib2to3/fixes/fix_print.py
index a1fe2f5c78..8780322265 100644
--- a/Lib/lib2to3/fixes/fix_print.py
+++ b/Lib/lib2to3/fixes/fix_print.py
@@ -18,7 +18,7 @@ from .. import patcomp
from .. import pytree
from ..pgen2 import token
from .. import fixer_base
-from ..fixer_util import Name, Call, Comma, String, is_tuple
+from ..fixer_util import Name, Call, Comma, String
parend_expr = patcomp.compile_pattern(
diff --git a/Lib/lib2to3/fixes/fix_types.py b/Lib/lib2to3/fixes/fix_types.py
index db34104785..67bf51f2f5 100644
--- a/Lib/lib2to3/fixes/fix_types.py
+++ b/Lib/lib2to3/fixes/fix_types.py
@@ -20,7 +20,6 @@ There should be another fixer that handles at least the following constants:
"""
# Local imports
-from ..pgen2 import token
from .. import fixer_base
from ..fixer_util import Name
@@ -42,7 +41,7 @@ _TYPE_MAPPING = {
'NotImplementedType' : 'type(NotImplemented)',
'SliceType' : 'slice',
'StringType': 'bytes', # XXX ?
- 'StringTypes' : 'str', # XXX ?
+ 'StringTypes' : '(str,)', # XXX ?
'TupleType': 'tuple',
'TypeType' : 'type',
'UnicodeType': 'str',
diff --git a/Lib/lib2to3/fixes/fix_urllib.py b/Lib/lib2to3/fixes/fix_urllib.py
index 1481cd91e3..5a36049df5 100644
--- a/Lib/lib2to3/fixes/fix_urllib.py
+++ b/Lib/lib2to3/fixes/fix_urllib.py
@@ -6,7 +6,6 @@
# Local imports
from lib2to3.fixes.fix_imports import alternates, FixImports
-from lib2to3 import fixer_base
from lib2to3.fixer_util import (Name, Comma, FromImport, Newline,
find_indentation, Node, syms)