-
Notifications
You must be signed in to change notification settings - Fork 295
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
Future imports above encoding? #97
Comments
@guettli : Thanks for the report! This is now fixed in v0.14.2. |
I believe this needs to be re-opened. It only works if the encoding specifier is in the very first line (not if it's in the second), and only if it uses the ^[ \t\f]*#.*?coding[:=][ \t]*([-_.a-zA-Z0-9]+) This licenses usage like the following (as can be seen in pyleptonica): # coding: utf-8 But this gives (with from __future__ import absolute_import
# coding: utf-8 ...which does not work anymore, and yields a follow-up error in Python 2 ( |
Is this you inted? The imports are above the "# -- coding: utf-8 --" line.
AFAIK the coding should be at the top of the file.
I think it is a bug.
What happens if there is "#!/usr/bin/python" at the top?
The text was updated successfully, but these errors were encountered: