Skip to content

futurize should insert *after* initial comment lines #121

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
hayd opened this issue Oct 28, 2014 · 3 comments
Closed

futurize should insert *after* initial comment lines #121

hayd opened this issue Oct 28, 2014 · 3 comments

Comments

@hayd
Copy link

hayd commented Oct 28, 2014

For example if I have a file like:

#### MODULE
# -*- coding: utf-8 -*-
# Author: etc. with some unicode Ÿ.
...

Currently futurize adds import above hence breaking the python import (since it's no longer correctly encoded):

from __future__ import division
#### MODULE
# -*- coding: utf-8 -*-   # this is no longer recognized, hence the module can not be imported
....

I think future should insert after initial comments (but before the first non-comment line).

edschofield added a commit that referenced this issue Nov 10, 2014
Also fix up the import-order checking code in future.tests.base
@edschofield
Copy link
Contributor

@hayd: thanks for the bug report! A fix for this has gone into the v0.14.x maintenance branch. I will release this as v0.14.2 soon. Please let me know if you notice any remaining problems.

@hayd
Copy link
Author

hayd commented Nov 10, 2014

@edschofield Thanks for the fix (and for the package)! I had been meaning to have a look at this myself (sorry for not getting round to it), I'll endeavour twice as hard to see what else I can break.

@edschofield
Copy link
Contributor

@hayd: You're welcome! :) This is now fixed in v0.14.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants