Skip to main content

flake8-copyright-validator

Flake8 plugin for validating copyright text in python files.


Installation

pip install flake8-copyright-validator

How to use

In your config file like setup.cfg under flake8 specify copyright-text wrapping every string with '.

[flake8]
copyright-text = 'Example copyright text'

Available flags

  • --update If difference or lack of copyright was found in file writes copyright text at the beginning of python file.
    If specified, value of bytes-to-read is ignored. Careful with this option if your header is incorrect it will add one more on top of wrong header.
  • --bytes-to-read If your copyright takes more than 2048 bytes or you want to load less text specify this value
  • --detailed-output Provides detailed output with flake8 error
  • --lines-to-exclude Files with first line containing value from lines to exclude will not be checked for copyright.
    Lines to exclude is not a comma separated list. It's a text that is split by end of line (\n).
  • --symbols-to-replace You can wrap your copyright text with symbols, by default it is ', it is used for specifying
    copyright text that starts with #. You can change it if you don't need it with this flag. It is comma separated list.

How it works

Plugin splits copyright text by end of line (\n), and reads 2048 bytes of file by default.
If differences were found it yields NCF100 No copyright found.
Plugin does not use comma separated lists for text

Complete example of setup.cfg

[flake8]
lines-to-exclude =
    '# Generated by Django'
    '#!'

copyright-text = 
    '# Example - Example'
    '# Copyright (C) Example'
    '#'
    '# This program is free software: you can redistribute it and/or modify'
    '# it under the terms of the GNU Affero General Public License as published'

Metadata

Release files for flake8-header-validator 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flake8-header-validator 0.0.3
File Size Uploaded Provenance
flake8-header-validator-0.0.3.tar.gz 4.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for flake8-header-validator 0.0.3
File Interpreter ABI Platform
flake8_header_validator-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 9.2 kB

Release files / flake8-header-validator-0.0.3.tar.gz

Download URL flake8-header-validator-0.0.3.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
b7e9ab1e9f40f19ba1b731e1acbe7aa9e30d6717ac79486d2568bd4a09b12e08
BLAKE2b-256 checksum
How to use checksums
024ae8d9f869f660f7d9d19bb550ce4d7572251e94d30208b00542d09495f1bb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Release files / flake8_header_validator-0.0.3-py3-none-any.whl

Download URL flake8_header_validator-0.0.3-py3-none-any.whl
Size 4.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
603202750c0fdb293028de9462687a0a18ecde148182a55874406535b857d1c1
BLAKE2b-256 checksum
How to use checksums
d13faa088f79e0f04c00a3cd169df4d33e21ceb4ffac29bf26e7c57a11738c1d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Security for flake8-header-validator 0.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page