fix_order___future__imports.py 829 B

123456789101112131415161718192021222324252627282930313233343536
  1. """
  2. UNFINISHED
  3. Fixer for turning multiple lines like these:
  4. from __future__ import division
  5. from __future__ import absolute_import
  6. from __future__ import print_function
  7. into a single line like this:
  8. from __future__ import (absolute_import, division, print_function)
  9. This helps with testing of ``futurize``.
  10. """
  11. from lib2to3 import fixer_base
  12. from libfuturize.fixer_util import future_import
  13. class FixOrderFutureImports(fixer_base.BaseFix):
  14. BM_compatible = True
  15. PATTERN = "file_input"
  16. run_order = 10
  17. # def match(self, node):
  18. # """
  19. # Match only once per file
  20. # """
  21. # if hasattr(node, 'type') and node.type == syms.file_input:
  22. # return True
  23. # return False
  24. def transform(self, node, results):
  25. # TODO # write me
  26. pass