summaryrefslogtreecommitdiffstats
path: root/Lib/lib2to3/fixes/fix_future.py
blob: 5476df41f27628eda06476e3e98823201e63ab8e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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()