Skip to content
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

Add additional support for file encoding comments #5085

Merged
merged 1 commit into from
May 20, 2018

Conversation

DevynCJohnson
Copy link

Emacs File Encoding comments support encodings such as "utf-8-unix" for UTF-8 encoded files that use Unix-newlines (a.k.a. \n). MyPy keeps failing due to my files using "utf-8-unix". The code I added will also support "utf-8-mac" (\r) and "utf-8-dos" (\r\n).

I am currently using this fix on my own system with success.

Emacs File Encoding comments support encodings such as "utf-8-unix" for UTF-8 encoded files that use Unix-newlines (a.k.a. \n). MyPy keeps failing due to my files using "utf-8-unix". The code I added will also support "utf-8-mac" (\r) and "utf-8-dos" (\r\n).

I am currently using this fix on my own system with success.
Copy link
Member

@gvanrossum gvanrossum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, I did not know (or had forgotten :-) that CPython uses this same rule.

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

Successfully merging this pull request may close these issues.

3 participants