Svelvet
Svelvet copied to clipboard
Python2 now detects encoding according to PEP263
This adds support for detecting source file encoding as defined in PEP263 in Python2.
- inlined python's 3 codecs.detect_encoding to make python2 recognize PEP 263 encodings the same way as the python3 implementation does
- simplified readlines implementation a little bit, to share the code between 2 and 3
- added the test case mentioned in the issue, and a shift-jis variant
- build passing at https://travis-ci.org/miszobi/pep8/builds/55316861
- fixes #391