Metadata-Version: 2.0
Name: flake8-author
Version: 1.1.4
Summary: Flake8 __author__ checker
Home-page: https://github.com/jparise/flake8-author
Author: Jon Parise
Author-email: jon@indelible.org
License: MIT
Download-URL: https://github.com/jparise/flake8-author/tarball/1.1.4
Keywords: flake8 __author__
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Quality Assurance
Requires-Dist: flake8

=========================
Flake8 __author__ Checker
=========================

|Build Status| |PyPI Version| |Python Versions|

``flake8-author`` is a `Flake8 <http://flake8.pycqa.org/>`_ 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__?

__ https://mail.python.org/pipermail/python-dev/2001-March/013328.html

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.

.. |Build Status| image::  https://img.shields.io/travis/jparise/flake8-author.svg
   :target: https://travis-ci.org/jparise/flake8-author
.. |PyPI Version| image:: https://img.shields.io/pypi/v/flake8-author.svg
   :target: https://pypi.python.org/pypi/flake8-author
.. |Python Versions| image:: https://img.shields.io/pypi/pyversions/flake8-author.svg
   :target: https://pypi.python.org/pypi/flake8-author


Installation
------------

Install from PyPI using ``pip``:

.. code-block:: sh

    $ 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.

.. code-block:: sh

    $ flake8 --version
    3.4.1 (author: 1.1.4, mccabe: 0.6.1, pycodestyle: 2.3.1, pyflakes: 1.5.0) CPython 2.7.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*

.. _error codes: http://flake8.pycqa.org/en/latest/user/error-codes.html

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: ``''``)

.. _config file: http://flake8.pycqa.org/en/latest/user/configuration.html
.. _re: https://docs.python.org/library/re.html


Changes
=======

1.1.4 (2017-07-29)
------------------

* Minor code and packaging cleanup.

1.1.3 (2017-07-28)
------------------

* Drop the ``setup_requires`` dependency on flake8.

1.1.2 (2017-01-12)
------------------

* Only apply the author regular expression pattern check when a pattern has
  actually been configured.

1.1.1 (2016-11-06)
------------------

* Fix configuration file parsing for flake8 3.0+.

1.1.0 (2016-08-15)
------------------

* Support flake8 3.0.0 (required for development)


1.0.2 (2016-06-02)
------------------

* Support flake8 version 2.6.0
* Drop test dependency on pytest (development only)


1.0.1 (2016-05-11)
------------------

* Fixed parser validation for configuration-based options


1.0.0 (2016-04-30)
------------------

* Initial release


