We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 108bb58 commit ebd1227Copy full SHA for ebd1227
src/libfuturize/fixer_util.py
@@ -220,8 +220,8 @@ def future_import(feature, node):
220
# If this __future__ import would go on the first line,
221
# detach the shebang / encoding prefix from the current first line.
222
# and attach it to our new __future__ import node.
223
- import_.set_prefix(root.children[0].get_prefix())
224
- root.children[0].set_prefix(u'')
+ import_.prefix = root.children[0].prefix
+ root.children[0].prefix = u''
225
# End the __future__ import line with a newline and add a blank line
226
# afterwards:
227
children = [import_ , Newline()]
0 commit comments