mirror of
https://github.com/morpheus65535/bazarr
synced 2024-12-23 00:03:33 +00:00
18 lines
401 B
Python
18 lines
401 B
Python
|
u"""
|
||
|
Fixer for print: from __future__ import print_function.
|
||
|
"""
|
||
|
|
||
|
from lib2to3 import fixer_base
|
||
|
from libfuturize.fixer_util import future_import
|
||
|
|
||
|
class FixPrintfunction(fixer_base.BaseFix):
|
||
|
|
||
|
# explicit = True
|
||
|
|
||
|
PATTERN = u"""
|
||
|
power< 'print' trailer < '(' any* ')' > any* >
|
||
|
"""
|
||
|
|
||
|
def transform(self, node, results):
|
||
|
future_import(u"print_function", node)
|