cpython/Lib/lib2to3/fixes/fix_future.py

16 lines
370 B
Python
Raw Normal View History

2008-03-19 01:43:46 -03:00
"""Remove __future__ imports
from __future__ import foo is replaced with an empty line.
"""
# Author: Christian Heimes
2008-03-19 01:43:46 -03:00
# Local imports
from . import basefix
from .util import BlankLine
2008-03-19 01:43:46 -03:00
class FixFuture(basefix.BaseFix):
PATTERN = """import_from< 'from' module_name="__future__" 'import' any >"""
def transform(self, node, results):
return BlankLine()