Skip to main content

Flake8 __author__ Checker

PyPI Version Python Versions

flake8-author is a Flake8 extension that checks Python modules for module-level __author__ attributes.

There is no official standard on __author__ usage. It is used largely by convention. Guido had this to say back in 2001:

Anothor source of discomfort is that there’s absolutely no standard for this kind of meta-data variables. We’ve got __version__, and I believe we once agreed on that (in 1994 or so :-). But __author__? __credits__? What next – __cute_signoff__?

This extension can therefore be configured to explicitly require or forbid __author__ attributes. By default, __author__ is considered optional.

If the __author__ attribute is allowed, its value can also be validated using a configurable regular expression pattern.

The __author__ attribute is generally assigned to a string, but multiple authors can be listed using a list (or tuple or set) of strings.

Installation

Install from PyPI using pip:

$ pip install flake8-author

The extension will be activated automatically by flake8. You can verify that it has been loaded by inspecting the flake8 --version string.

$ flake8 --version
7.3.0 (author: 2.3.0, ...) CPython 3.11.13 on Darwin

Error Codes

This extension adds three new error codes (using the A40 prefix):

  • A400: a module-level __author__ attribute is required

  • A401: __author__ attributes are not allowed

  • A402: __author__ attribute value does not match pattern

Configuration

Configuration values are specified in the [flake8] section of your config file or as command line arguments (e.g. --author-attribute=required).

  • author-attribute: “optional”, “required”, “forbidden” (default: optional)

  • author-pattern: __author__ validation re pattern (default: '')

Metadata

Release files for flake8-author 2.3.0

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-author 2.3.0
File Size Uploaded
flake8_author-2.3.0.tar.gz 5.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for flake8-author 2.3.0
File Interpreter ABI Platform
flake8_author-2.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 10.7 kB

Release files / flake8_author-2.3.0.tar.gz

Download URL flake8_author-2.3.0.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
8c8081f77ce36228fe68d9cde3a3a1d87570575a49f8e082004024b1d618c9c1
BLAKE2b-256 checksum
How to use checksums
c97f7595659b47696641005c550161caf9bf3ce2732ea244470f283b62ca9a06
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / flake8_author-2.3.0-py3-none-any.whl

Download URL flake8_author-2.3.0-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ddbbe3b4a4063dbe10b61995b01cb41ac5e2d9c84e2a75aa0e95a58183ad533e
BLAKE2b-256 checksum
How to use checksums
63a8147580fd27ded206f01149d8669d53564fec515f7ff6b37e3e723f436c64
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release history Release notifications | RSS feed

This release

2.3.0 This release

2 release files

2.2.0

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.2.0

2 release files

1.1.4

3 release files

1.1.3

2 release files

1.1.2

1 release file

1.1.1

1 release file

1.1.0

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0.0

1 release file

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