Adds copyright checks to flake8
Project description
Checks for copyright notices in all python files. It runs a simple regular expression search for strings like:
Copyright 2014 <author> Copyright (C) 2014 <author>
<author> can be anything unless you specify it with the copyright-author option (see below).
Install
Install with pip:
pip install flake8-copyright
Then, activate copyright checks in your flake8 configuration with:
copyright-check = True # C errors are not selected by default, so add them to your selection select = E,F,W,C
Further options
- copyright-min-file-size
Minimum number of characters in a file before requiring a copyright notice. This is to avoid forcing yourself to add copyright notices to very small or empty files. Default: 0.
- copyright-author
Checks for a specific author in the copyright notice.
- copyright-regexp
If you’re not happy with the regexp that is ran to look for copyright notices, you can change it with this option. Default: Copyright\s+(\(C\)\s+)?\d{4}([-,]\d{4})*\s+%(author)s. %(author)s is replaced by the contents of copyright-author.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for flake8_copyright-0.2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dbad92ee5f51398722cd571b6e36cc3651914bf1b286b0e638bba1f4af0b6f5b |
|
MD5 | bf6a638b548d4c6aaa92edbe23eeeafc |
|
BLAKE2b-256 | af9ca8ad17f373dfad4c0fea345290ef8ce54d63b76a3166d6bb57030d7a6d59 |
Hashes for flake8_copyright-0.2.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 616a960c9602ad2d0136bf3f12564e253caffe82f151d2982f78a12a42e1faa0 |
|
MD5 | a5a6e3078f09e2392a46066b6317f121 |
|
BLAKE2b-256 | 178319b630889d8c3291a04ddb6ab5bf691618a07a11be239c15f2b524708b93 |