OLD | NEW |
(Empty) | |
| 1 import sys |
| 2 from lib2to3 import refactor |
| 3 |
| 4 # The original set of these fixes comes from lib3to2 (https://bitbucket.org/amen
tajo/lib3to2): |
| 5 fix_names = set([ |
| 6 'libpasteurize.fixes.fix_add_all__future__imports', # from __f
uture__ import absolute_import etc. on separate lines |
| 7 'libpasteurize.fixes.fix_add_future_standard_library_import',
# we force adding this import for now, even if it doesn't seem necessary to the
fix_future_standard_library fixer, for ease of testing |
| 8 # 'libfuturize.fixes.fix_order___future__imports', # consolida
tes to a single line to simplify testing -- UNFINISHED |
| 9 'libpasteurize.fixes.fix_future_builtins', # adds "from futur
e.builtins import *" |
| 10 'libfuturize.fixes.fix_future_standard_library', # adds "from f
uture import standard_library" |
| 11 |
| 12 'libpasteurize.fixes.fix_annotations', |
| 13 # 'libpasteurize.fixes.fix_bitlength', # ints have this in Py2
.7 |
| 14 # 'libpasteurize.fixes.fix_bool', # need a decorator or Mixi
n |
| 15 # 'libpasteurize.fixes.fix_bytes', # leave bytes as bytes |
| 16 # 'libpasteurize.fixes.fix_classdecorator', # available in |
| 17 # Py2.6+ |
| 18 # 'libpasteurize.fixes.fix_collections', hmmm ... |
| 19 # 'libpasteurize.fixes.fix_dctsetcomp', # avail in Py27 |
| 20 'libpasteurize.fixes.fix_division', # yes |
| 21 # 'libpasteurize.fixes.fix_except', # avail in Py2.6+ |
| 22 # 'libpasteurize.fixes.fix_features', # ? |
| 23 'libpasteurize.fixes.fix_fullargspec', |
| 24 # 'libpasteurize.fixes.fix_funcattrs', |
| 25 'libpasteurize.fixes.fix_getcwd', |
| 26 'libpasteurize.fixes.fix_imports', # adds "from future import
standard_library" |
| 27 'libpasteurize.fixes.fix_imports2', |
| 28 # 'libpasteurize.fixes.fix_input', |
| 29 # 'libpasteurize.fixes.fix_int', |
| 30 # 'libpasteurize.fixes.fix_intern', |
| 31 # 'libpasteurize.fixes.fix_itertools', |
| 32 'libpasteurize.fixes.fix_kwargs', # yes, we want this |
| 33 # 'libpasteurize.fixes.fix_memoryview', |
| 34 # 'libpasteurize.fixes.fix_metaclass', # write a custom handle
r for |
| 35 # this |
| 36 # 'libpasteurize.fixes.fix_methodattrs', # __func__ and __self
__ seem to be defined on Py2.7 already |
| 37 'libpasteurize.fixes.fix_newstyle', # yes, we want this: expl
icit inheritance from object. Without new-style classes in Py2, super() will bre
ak etc. |
| 38 # 'libpasteurize.fixes.fix_next', # use a decorator for this |
| 39 # 'libpasteurize.fixes.fix_numliterals', # prob not |
| 40 # 'libpasteurize.fixes.fix_open', # huh? |
| 41 # 'libpasteurize.fixes.fix_print', # no way |
| 42 'libpasteurize.fixes.fix_printfunction', # adds __future__ imp
ort print_function |
| 43 # 'libpasteurize.fixes.fix_raise_', # TODO: get this working! |
| 44 |
| 45 # 'libpasteurize.fixes.fix_range', # nope |
| 46 # 'libpasteurize.fixes.fix_reduce', |
| 47 # 'libpasteurize.fixes.fix_setliteral', |
| 48 # 'libpasteurize.fixes.fix_str', |
| 49 # 'libpasteurize.fixes.fix_super', # maybe, if our magic super
() isn't robust enough |
| 50 'libpasteurize.fixes.fix_throw', # yes, if Py3 supports it |
| 51 # 'libpasteurize.fixes.fix_unittest', |
| 52 'libpasteurize.fixes.fix_unpacking', # yes, this is useful |
| 53 # 'libpasteurize.fixes.fix_with' # way out of date |
| 54 ]) |
| 55 |
OLD | NEW |