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

Source-Code encoding can only be specified once #453

Closed
nedbat opened this issue Dec 13, 2015 · 2 comments
Closed

Source-Code encoding can only be specified once #453

nedbat opened this issue Dec 13, 2015 · 2 comments
Labels
bug Something isn't working

Comments

@nedbat
Copy link
Owner

nedbat commented Dec 13, 2015

Originally reported by Anonymous


Hi

I found that coveralls can't process files which have both the emacs and vim style fileencoding specifiers are given at the top of a file.

# -*-  coding:utf-8 -*-
# vim: fileencoding=utf-8

I created a gist that reproduces the problem. You can run it with

nosetests test_example.py --with-coverage --cover-package=exampl

This will result in an error like this.

example.py   NotPython: Couldn't parse '/home/max/Desktop/coverage-test/example.py' as Python source: 'encoding declaration in Unicode string' at line 0

According to PEP 0263 both are OK but it
doesn't say anything about giving both forms.


@nedbat
Copy link
Owner Author

nedbat commented Dec 24, 2015

Finish up Max Linke's fix for double encoding declarations. Fixes #453

→ <<cset 3d74bc2d93c1 (bb)>>

@nedbat
Copy link
Owner Author

nedbat commented Dec 24, 2015

Fixed in 3d74bc2d93c1 (bb)

@nedbat nedbat closed this as completed Dec 24, 2015
@nedbat nedbat added major bug Something isn't working labels Jun 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant