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 Distribution
File details
Details for the file flake8-copyright-0.2.3.tar.gz
.
File metadata
- Download URL: flake8-copyright-0.2.3.tar.gz
- Upload date:
- Size: 17.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 698840480d377e7c70172672636d898ad7b8af210492f431fff066e75b481d59 |
|
MD5 | 120e91acfc166012f3b4dadb0a429ac7 |
|
BLAKE2b-256 | cf886a2824f1952986d9c0e9f8c2d6bad2ab0a8f3eb9cac78b082ec773ed0809 |
File details
Details for the file flake8_copyright-0.2.3-py3-none-any.whl
.
File metadata
- Download URL: flake8_copyright-0.2.3-py3-none-any.whl
- Upload date:
- Size: 18.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f899782bedce6bf086419fd5fb66da6ae0698b0d7faa5269520b4c965d74883 |
|
MD5 | 0f6b5f03cce0b7d49f5139eff3645ef8 |
|
BLAKE2b-256 | 2309d8ab39c52da606087c942f36a22eb269f26b8db9f954f7b7a899be45b4a6 |