diff options
Diffstat (limited to 'Lib/lib2to3/fixes/fix_future.py')
-rw-r--r-- | Lib/lib2to3/fixes/fix_future.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Lib/lib2to3/fixes/fix_future.py b/Lib/lib2to3/fixes/fix_future.py new file mode 100644 index 0000000..5476df4 --- /dev/null +++ b/Lib/lib2to3/fixes/fix_future.py @@ -0,0 +1,16 @@ +"""Remove __future__ imports + +from __future__ import foo is replaced with an empty line. +""" +# Author: Christian Heimes + +# Local imports +from . import basefix +from .util import BlankLine + +class FixFuture(basefix.BaseFix): + PATTERN = """import_from< 'from' module_name="__future__" 'import' any >""" + + def transform(self, node, results): + return BlankLine() + |