summaryrefslogtreecommitdiffstats
path: root/Lib/lib2to3/fixes/fix_imports.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/lib2to3/fixes/fix_imports.py')
-rw-r--r--Lib/lib2to3/fixes/fix_imports.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/lib2to3/fixes/fix_imports.py b/Lib/lib2to3/fixes/fix_imports.py
index e7e7a75..38e868b 100644
--- a/Lib/lib2to3/fixes/fix_imports.py
+++ b/Lib/lib2to3/fixes/fix_imports.py
@@ -66,9 +66,9 @@ def build_pattern(mapping=MAPPING):
yield """import_name< 'import' ((%s)
| dotted_as_names< any* (%s) any* >) >
""" % (mod_list, mod_list)
- yield """import_from< 'from' (%s) 'import'
+ yield """import_from< 'from' (%s) 'import' ['(']
( any | import_as_name< any 'as' any > |
- import_as_names< any* >) >
+ import_as_names< any* >) [')'] >
""" % mod_name_list
yield """import_name< 'import'
dotted_as_name< (%s) 'as' any > >