Adds coding magic comment checks to flake8
Adds coding magic comment checks (coding:) to flake8.
Install with pip:
$ pip install flake8-coding
You can check that flake8 has picked it up by looking for flake8_coding in the output of --version:
$ flake8 --version 2.5.4 (pep8: 1.7.0, pyflakes: 1.0.0, flake8_coding: 1.1.1, mccabe: 0.4.0) CPython 2.7.11 on Darwin
A comma-separated list of acceptable source code encodings for the coding: magic comments in files. Default is latin-1, utf-8.
You can pass this as a command-line argument to flake8, e.g. --accept-encodings=utf-8,utf-16, or put it in your config file, e.g.:
[flake8] accept-encodings = utf-8,utf-16
If activated, this disallows all coding: magic comments, no matter their encoding. This might be useful for Python 3 projects where UTF-8 is the default and you don’t want other encodings used in your project.
You can pass this as a command-line argument to flake8, e.g. --no-accept-encodings, or put it in your config file, e.g.:
[flake8] no-accept-encodings = True
No magic encoding comment was found in the file. As per PEP-263, this must be in the first two lines of the file.
The encoding found in the magic encoding comment did not match the accept-encodings option.
no-accept-encodings is set, and a magic encoding comment was found in the file.
Apache License 2.0
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|File Name & Checksum SHA256 Checksum Help||Version||File Type||Upload Date|
|flake8_coding-1.3.0-py2.py3-none-any.whl (5.2 kB) Copy SHA256 Checksum SHA256||2.7||Wheel||Aug 20, 2016|
|flake8-coding-1.3.0.tar.gz (7.3 kB) Copy SHA256 Checksum SHA256||–||Source||Aug 20, 2016|