Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(600)

Side by Side Diff: third_party/google-endpoints/libfuturize/fixes/fix_future_standard_library.py

Issue 2666783008: Add google-endpoints to third_party/. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 """
2 For the ``future`` package.
3
4 Changes any imports needed to reflect the standard library reorganization. Also
5 Also adds these import lines:
6
7 from future import standard_library
8 standard_library.install_aliases()
9
10 after any __future__ imports but before any other imports.
11 """
12
13 from lib2to3.fixes.fix_imports import FixImports
14 from libfuturize.fixer_util import touch_import_top
15
16
17 class FixFutureStandardLibrary(FixImports):
18 run_order = 8
19
20 def transform(self, node, results):
21 result = super(FixFutureStandardLibrary, self).transform(node, results)
22 # TODO: add a blank line between any __future__ imports and this?
23 touch_import_top(u'future', u'standard_library', node)
24 return result
25
26
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698